-
Notifications
You must be signed in to change notification settings - Fork 70
feat(mcp): build flagset from mcp input schema to parse args #1215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+381
−32
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
This was referenced Nov 27, 2025
30adde0 to
75745b3
Compare
965b1cd to
8c88192
Compare
75745b3 to
926edde
Compare
8c88192 to
c6d1745
Compare
926edde to
0d18f1c
Compare
37b35d8 to
10b9829
Compare
f26eeef to
912eaff
Compare
10b9829 to
c93e6a0
Compare
912eaff to
b917a41
Compare
c93e6a0 to
619a3a0
Compare
b917a41 to
bae1fb1
Compare
619a3a0 to
c3d97d0
Compare
bae1fb1 to
d8c7c8e
Compare
90c48d3 to
1c9d1aa
Compare
b2e3fed to
c38298d
Compare
f752670 to
d72c626
Compare
c38298d to
ea6611c
Compare
d72c626 to
9618084
Compare
ea6611c to
d89a358
Compare
- validate flags with inputSchema
* make json rpc 2.0 call based on cli args - basic sse resposne parsing - remove zero / nil arguments before making the request * move tool request to mcp_request.go * print tool response according to output schema * print structuredContent from JSON RPC response * only register mcp command if SRC_EXPERIMENT_MCP=true * rename ParseToolResponse to DecodeToolResponse
b5e8e6f to
700a6cb
Compare
burmudar
added a commit
that referenced
this pull request
Dec 9, 2025
* add mcp list-tools to list available tool calls * set variable name for embedded json * make default LoadToolDefinitions and unexported loadToolDefinitions * use internal/mcp * improve list-tools output * change name to RawName and have method for Name() that is normalized * remove Name() method and use method name field * feat(mcp): build flagset from mcp input schema to parse args (#1215) - parse input schema to build flagset for mcp command * review feedback - errors.Wrapf - strings.TrimPrefix
burmudar
added a commit
that referenced
this pull request
Dec 9, 2025
- parse input schema to build flagset for mcp command
burmudar
added a commit
that referenced
this pull request
Dec 9, 2025
* add script to dump mcp tool list * parse mcp tool json * fix parsing for when items: true * use lib/errors * temporarily ignore embedded json * move mcp files to internal/mcp * unexport and remove unused structs * rename MCPToolDef to ToolDef and move around structs * rename parser + method to decoder + decode* * simplify types fold: Schema into SchemaObject * review comments * feat(mcp): build flagset from mcp input schema to parse args (#1215) - parse input schema to build flagset for mcp command * merge fixup * fix lint * fix imports
burmudar
added a commit
that referenced
this pull request
Dec 9, 2025
- parse input schema to build flagset for mcp command
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We build a flagset from the input schema. This allows the input schema to be the
source of truth of the flags on the mcp command and ensures we are up to date with
the schema stored in the repository.
Part of SRCH-2167
Test plan
Added a test case and also executed locally with
commit-search