Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch @modelcontextprotocol/sdk@1.29.0 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-json-schema-compat.js b/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-json-schema-compat.js
index bc067da..ad3237f 100644
--- a/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-json-schema-compat.js
+++ b/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-json-schema-compat.js
@@ -54,7 +54,9 @@ function toJsonSchemaCompat(schema, opts) {
// v3 branch — use vendored converter
return (0, zod_to_json_schema_1.zodToJsonSchema)(schema, {
strictUnions: opts?.strictUnions ?? true,
- pipeStrategy: opts?.pipeStrategy ?? 'input'
+ pipeStrategy: opts?.pipeStrategy ?? 'input',
+ definitionPath: "$defs",
+ $refStrategy: "none"
});
}
function getMethodLiteral(schema) {
diff --git a/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js b/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
index 62f7fd0..4965ae1 100644
--- a/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
+++ b/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
@@ -26,7 +26,9 @@ export function toJsonSchemaCompat(schema, opts) {
// v3 branch — use vendored converter
return zodToJsonSchema(schema, {
strictUnions: opts?.strictUnions ?? true,
- pipeStrategy: opts?.pipeStrategy ?? 'input'
+ pipeStrategy: opts?.pipeStrategy ?? 'input',
+ definitionPath: "$defs",
+ $refStrategy: "none"
});
}
export function getMethodLiteral(schema) {
This issue body was partially generated by patch-package.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@modelcontextprotocol/sdk@1.29.0for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.