(ctx context.Context, req *mcp.CallToolRequest, _ any)
| 223 | } |
| 224 | |
| 225 | func samplingTool(ctx context.Context, req *mcp.CallToolRequest, _ any) (*mcp.CallToolResult, any, error) { |
| 226 | res, err := req.Session.CreateMessage(ctx, new(mcp.CreateMessageParams)) |
| 227 | if err != nil { |
| 228 | return nil, nil, fmt.Errorf("sampling failed: %v", err) |
| 229 | } |
| 230 | return &mcp.CallToolResult{ |
| 231 | Content: []mcp.Content{ |
| 232 | res.Content, |
| 233 | }, |
| 234 | }, nil, nil |
| 235 | } |
| 236 | |
| 237 | func elicitFormTool(ctx context.Context, req *mcp.CallToolRequest, _ any) (*mcp.CallToolResult, any, error) { |
| 238 | res, err := req.Session.Elicit(ctx, &mcp.ElicitParams{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…