MCPcopy Index your code
hub / github.com/coder/coder / CallTool

Method CallTool

aibridge/mcp/proxy_streamable_http.go:122–134  ·  view source on GitHub ↗
(ctx context.Context, name string, input any)

Source from the content-addressed store, hash-verified

120}
121
122func (p *StreamableHTTPServerProxy) CallTool(ctx context.Context, name string, input any) (*mcp.CallToolResult, error) {
123 tool := p.GetTool(name)
124 if tool == nil {
125 return nil, xerrors.Errorf("%q tool not known", name)
126 }
127
128 return p.client.CallTool(ctx, mcp.CallToolRequest{
129 Params: mcp.CallToolParams{
130 Name: tool.Name,
131 Arguments: input,
132 },
133 })
134}
135
136func (p *StreamableHTTPServerProxy) fetchTools(ctx context.Context) (_ map[string]*Tool, outErr error) {
137 ctx, span := p.tracer.Start(ctx, "StreamableHTTPServerProxy.Init.fetchTools", trace.WithAttributes(p.traceAttributes()...))

Callers

nothing calls this directly

Calls 3

GetToolMethod · 0.95
CallToolMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected