mcp: panic if AddTool method is given a nil InputSchema (#157)
The spec requires an input schema for every tool.
This commit is contained in:
parent
94b88a26e0
commit
8dd9a819bb
1 changed files with 14 additions and 8 deletions
|
|
@ -659,7 +659,7 @@ func TestCancellation(t *testing.T) {
|
|||
return nil, nil
|
||||
}
|
||||
_, cs := basicConnection(t, func(s *Server) {
|
||||
s.AddTool(&Tool{Name: "slow"}, slowRequest)
|
||||
s.AddTool(&Tool{Name: "slow", InputSchema: &jsonschema.Schema{}}, slowRequest)
|
||||
})
|
||||
defer cs.Close()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue