Repository navigation
Commit 737644e
authored
fix: merge globals into mcp tool schemas and openapi operations (#260)
* fix: merge globals into mcp tool schemas and openapi operations
Global options were only parsed from argv and HTTP command routes. MCP
tools (stdio and HTTP) omitted them from input schemas and ran commands
and middleware with empty globals, and the generated OpenAPI document
left them out of every operation.
Merge the globals schema into each tool's input schema and OpenAPI
operation, and split global keys back out of tool calls, validating
them with the globals schema before middleware runs. A global wins over
a command option of the same name, as on the CLI and over HTTP.
* fix: keep mcp positional values that share a global's name
* fix: avoid reparsing mcp globals after direct tool validation
* fix: type mcp serve middleware globals from the globals schema
* fix: document the mcp callTool globals option
* fix: mark the mcp globals changeset as minor1 parent 67a09c6 commit 737644e
8 files changed
Lines changed: 436 additions & 29 deletions
File tree
- .changeset
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6644 | 6644 | | |
6645 | 6645 | | |
6646 | 6646 | | |
6647 | | - | |
| 6647 | + | |
6648 | 6648 | | |
6649 | 6649 | | |
6650 | 6650 | | |
| |||
7020 | 7020 | | |
7021 | 7021 | | |
7022 | 7022 | | |
| 7023 | + | |
| 7024 | + | |
| 7025 | + | |
| 7026 | + | |
| 7027 | + | |
| 7028 | + | |
| 7029 | + | |
| 7030 | + | |
| 7031 | + | |
| 7032 | + | |
| 7033 | + | |
| 7034 | + | |
| 7035 | + | |
| 7036 | + | |
| 7037 | + | |
| 7038 | + | |
| 7039 | + | |
| 7040 | + | |
| 7041 | + | |
| 7042 | + | |
| 7043 | + | |
| 7044 | + | |
| 7045 | + | |
| 7046 | + | |
| 7047 | + | |
| 7048 | + | |
| 7049 | + | |
| 7050 | + | |
| 7051 | + | |
| 7052 | + | |
| 7053 | + | |
| 7054 | + | |
| 7055 | + | |
| 7056 | + | |
| 7057 | + | |
| 7058 | + | |
| 7059 | + | |
| 7060 | + | |
| 7061 | + | |
| 7062 | + | |
| 7063 | + | |
| 7064 | + | |
7023 | 7065 | | |
7024 | 7066 | | |
7025 | 7067 | | |
| |||
7710 | 7752 | | |
7711 | 7753 | | |
7712 | 7754 | | |
| 7755 | + | |
| 7756 | + | |
| 7757 | + | |
| 7758 | + | |
| 7759 | + | |
| 7760 | + | |
| 7761 | + | |
| 7762 | + | |
| 7763 | + | |
| 7764 | + | |
| 7765 | + | |
| 7766 | + | |
| 7767 | + | |
| 7768 | + | |
7713 | 7769 | | |
7714 | 7770 | | |
7715 | 7771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
| 908 | + | |
908 | 909 | | |
909 | 910 | | |
910 | 911 | | |
| |||
2000 | 2001 | | |
2001 | 2002 | | |
2002 | 2003 | | |
| 2004 | + | |
2003 | 2005 | | |
2004 | 2006 | | |
2005 | 2007 | | |
| |||
2028 | 2030 | | |
2029 | 2031 | | |
2030 | 2032 | | |
| 2033 | + | |
2031 | 2034 | | |
2032 | 2035 | | |
2033 | 2036 | | |
| |||
2047 | 2050 | | |
2048 | 2051 | | |
2049 | 2052 | | |
| 2053 | + | |
2050 | 2054 | | |
2051 | 2055 | | |
2052 | 2056 | | |
| |||
2074 | 2078 | | |
2075 | 2079 | | |
2076 | 2080 | | |
| 2081 | + | |
2077 | 2082 | | |
2078 | 2083 | | |
2079 | 2084 | | |
| |||
2152 | 2157 | | |
2153 | 2158 | | |
2154 | 2159 | | |
| 2160 | + | |
2155 | 2161 | | |
2156 | 2162 | | |
2157 | 2163 | | |
| |||
2189 | 2195 | | |
2190 | 2196 | | |
2191 | 2197 | | |
| 2198 | + | |
2192 | 2199 | | |
2193 | 2200 | | |
2194 | 2201 | | |
| |||
3046 | 3053 | | |
3047 | 3054 | | |
3048 | 3055 | | |
| 3056 | + | |
3049 | 3057 | | |
3050 | 3058 | | |
3051 | 3059 | | |
| |||
3443 | 3451 | | |
3444 | 3452 | | |
3445 | 3453 | | |
3446 | | - | |
| 3454 | + | |
3447 | 3455 | | |
3448 | 3456 | | |
3449 | 3457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments