Skip to content

Commit 19f5334

Browse files
committed
fix: prefix project_uid with "project:" for query service Parent field
The query service Parent parameter requires a typed reference in the form "<type>:<id>" (validated by regexp ^[a-zA-Z]+:[a-zA-Z0-9_-]+$). Passing a bare UUID causes a 400 BadRequest. Also update the project_uid arg description to clarify it takes a plain UID (the tool handles the prefix internally). 🤖 Generated with [GitHub Copilot](https://github.com/features/copilot) (via Zed) Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
1 parent 433d19d commit 19f5334

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

internal/tools/committee.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func RegisterSearchCommitteeMembers(server *mcp.Server) {
7070
// SearchCommitteesArgs defines the input parameters for the search_committees tool.
7171
type SearchCommitteesArgs struct {
7272
Name string `json:"name,omitempty" jsonschema:"Name or partial name of the committee to search for"`
73-
ProjectUID string `json:"project_uid,omitempty" jsonschema:"Optional project UID to filter committees by project"`
73+
ProjectUID string `json:"project_uid,omitempty" jsonschema:"Optional v2 project UID to filter committees by project (e.g. a27394a3-7a6c-4d0f-9e0f-692d8753924f)"`
7474
PageSize int `json:"page_size,omitempty" jsonschema:"Number of results per page (default 10, max 100)"`
7575
PageToken string `json:"page_token,omitempty" jsonschema:"Opaque pagination token from a previous search response"`
7676
}
@@ -154,7 +154,9 @@ func handleSearchCommittees(ctx context.Context, req *mcp.CallToolRequest, args
154154
}
155155

156156
if args.ProjectUID != "" {
157-
payload.Parent = &args.ProjectUID
157+
// The query service requires parent refs in the form "<type>:<id>".
158+
parentRef := "project:" + args.ProjectUID
159+
payload.Parent = &parentRef
158160
}
159161

160162
if args.PageToken != "" {

0 commit comments

Comments
 (0)