improved tool debugging
This commit is contained in:
@@ -19,7 +19,8 @@ type mcpGoClientWrapper struct {
|
||||
client *client.Client
|
||||
}
|
||||
|
||||
func (w *mcpGoClientWrapper) CallTool(ctx context.Context, name string, args map[string]interface{}) (string, error) {
|
||||
func (w *mcpGoClientWrapper) CallTool(ctx context.Context, name string,
|
||||
args map[string]interface{}) (string, error) {
|
||||
req := mcp.CallToolRequest{}
|
||||
req.Params.Name = name
|
||||
req.Params.Arguments = args
|
||||
@@ -130,7 +131,8 @@ func SetMCPClientFactory(factory MCPClientFactory) {
|
||||
}
|
||||
|
||||
// CallExternalTool creates a scoped MCP connection, calls the tool, and cleans up
|
||||
func CallExternalTool(ctx context.Context, toolset string, toolName string, args map[string]interface{}) (string, error) {
|
||||
func CallExternalTool(ctx context.Context, toolset string, toolName string,
|
||||
args map[string]interface{}) (string, error) {
|
||||
c, err := defaultMCPFactory(toolset)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to create MCP client for %s: %w", toolset, err)
|
||||
|
||||
Reference in New Issue
Block a user