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

Function newMCPTool

coderd/x/chatd/mcpclient/mcpclient.go:521–538  ·  view source on GitHub ↗

newMCPTool creates an mcpToolWrapper from an mcp.Tool discovered on a remote server.

(
	configID uuid.UUID,
	serverSlug string,
	tool mcp.Tool,
	mcpClient *client.Client,
	modelIntent bool,
)

Source from the content-addressed store, hash-verified

519// newMCPTool creates an mcpToolWrapper from an mcp.Tool
520// discovered on a remote server.
521func newMCPTool(
522 configID uuid.UUID,
523 serverSlug string,
524 tool mcp.Tool,
525 mcpClient *client.Client,
526 modelIntent bool,
527) *mcpToolWrapper {
528 return &mcpToolWrapper{
529 configID: configID,
530 prefixedName: serverSlug + toolNameSep + tool.Name,
531 originalName: tool.Name,
532 description: tool.Description,
533 parameters: tool.InputSchema.Properties,
534 required: tool.InputSchema.Required,
535 modelIntent: modelIntent,
536 client: mcpClient,
537 }
538}
539
540func (t *mcpToolWrapper) Info() fantasy.ToolInfo {
541 required := t.required

Callers 1

connectOneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected