mcp: enforce input schema type "object" (#349)
The spec makes it clear that input schemas must have type "object". Enforce that. Allow "any" as an input argument type by special-casing it. Fixes #283.
This commit is contained in:
parent
4587941994
commit
18c96d6912
1 changed files with 18 additions and 9 deletions
|
|
@ -232,7 +232,7 @@ func TestServerPaginateVariousPageSizes(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestServerCapabilities(t *testing.T) {
|
||||
tool := &Tool{Name: "t", InputSchema: &jsonschema.Schema{}}
|
||||
tool := &Tool{Name: "t", InputSchema: &jsonschema.Schema{Type: "object"}}
|
||||
testCases := []struct {
|
||||
name string
|
||||
configureServer func(s *Server)
|
||||
|
|
|
|||
Loading…
Reference in a new issue