Skip to content

Conversation

@burmudar
Copy link
Contributor

@burmudar burmudar commented Nov 27, 2025

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

@burmudar
Copy link
Contributor Author

burmudar commented Nov 27, 2025

@burmudar burmudar self-assigned this Nov 27, 2025
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from 30adde0 to 75745b3 Compare November 28, 2025 09:28
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch from 965b1cd to 8c88192 Compare November 28, 2025 09:28
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from 75745b3 to 926edde Compare November 28, 2025 12:41
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch from 8c88192 to c6d1745 Compare November 28, 2025 12:41
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from 926edde to 0d18f1c Compare November 28, 2025 12:48
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch 2 times, most recently from 37b35d8 to 10b9829 Compare November 28, 2025 12:54
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from f26eeef to 912eaff Compare November 28, 2025 12:58
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch from 10b9829 to c93e6a0 Compare November 28, 2025 12:58
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from 912eaff to b917a41 Compare December 2, 2025 09:46
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch from c93e6a0 to 619a3a0 Compare December 2, 2025 09:46
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from b917a41 to bae1fb1 Compare December 2, 2025 10:11
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch from 619a3a0 to c3d97d0 Compare December 2, 2025 10:11
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from bae1fb1 to d8c7c8e Compare December 2, 2025 12:46
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch 2 times, most recently from 90c48d3 to 1c9d1aa Compare December 2, 2025 14:44
@burmudar burmudar changed the title build flagset from input schema to parse args feat(mcp): build flagset from mcp input schema to parse args Dec 2, 2025
@burmudar burmudar marked this pull request as ready for review December 2, 2025 15:24
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from b2e3fed to c38298d Compare December 4, 2025 09:43
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch from f752670 to d72c626 Compare December 4, 2025 09:43
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from c38298d to ea6611c Compare December 5, 2025 09:35
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch from d72c626 to 9618084 Compare December 5, 2025 09:35
@burmudar burmudar force-pushed the wb/mcp-rawname-name branch from ea6611c to d89a358 Compare December 5, 2025 10:19
@burmudar burmudar force-pushed the wb/mcp-flagset-inputschema branch from b5e8e6f to 700a6cb Compare December 9, 2025 08:21
@burmudar burmudar merged commit de877c3 into wb/mcp-list-tools Dec 9, 2025
2 of 8 checks passed
@burmudar burmudar deleted the wb/mcp-flagset-inputschema branch December 9, 2025 08:28
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants