fix(codemod): keep request() result schemas the call still needs (#2383)
This commit is contained in:
parent
ba27d201e1
commit
9f8ba61279
1 changed files with 157 additions and 0 deletions
5
.changeset/lucky-poets-refuse.md
Normal file
5
.changeset/lucky-poets-refuse.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@modelcontextprotocol/codemod': patch
|
||||
---
|
||||
|
||||
Keep the result-schema argument on `request()` calls unless the method is a literal spec method, and keep the generic passthrough `ResultSchema` even then. Schema-less v2 `request()` enforces the spec result schema for spec methods and throws a `TypeError` for non-spec methods, so dropping the schema from a dynamic-method call site (the proxy/forwarder shape, `request({ method, params }, ResultSchema)`) or from a custom-method call broke the call. `callTool()` is unaffected — v2 `callTool()` has no schema parameter.
|
||||
Loading…
Reference in a new issue