mcp: add Cacheable fields to DiscoverResult (#1022)

This PR add the Cacheable fields to the DiscoverResult, as it was added
later
(8e4c2322ca)
This commit is contained in:
Guglielmo Colombo 2026-06-24 14:08:43 +02:00 • committed by GitHub
commit a817f61412
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -531,7 +531,7 @@ func Example_mrtr() {
// uses it to fulfil any input request the tool handler returns.
c := mcp.NewClient(&mcp.Implementation{Name: "client", Version: "v0.0.1"}, &mcp.ClientOptions{
ElicitationHandler: func(_ context.Context, _ *mcp.ElicitRequest) (*mcp.ElicitResult, error) {
return &mcp.ElicitResult{Action: "accept", Content: map[string]any{"name": "Ada"}}, nil
return &mcp.ElicitResult{Action: "accept", Content: map[string]any{"name": "MCP Go"}}, nil
},
})