fix: strip and validate tool outputSchema and inputSchema (#860)
* fix: remove unnecessary fields from tools' outputSchema * fix: validate input schema root type per MCP spec
This commit is contained in:
parent
8f558d83be
commit
254f04a764
1 changed files with 158 additions and 65 deletions
|
|
@ -23,6 +23,20 @@
|
|||
"a",
|
||||
"b"
|
||||
]
|
||||
},
|
||||
"outputSchema": {
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sum": {
|
||||
"description": "The sum of the two numbers.",
|
||||
"format": "double",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sum"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue