@@ -98,9 +98,26 @@ func (b *McpTool) Name() string {
100func (b *McpTool) Info() tools.ToolInfo {
100func (b *McpTool) Info() tools.ToolInfo {
101+ var parameters map[string]any
102+ var required []string
101− input := b.tool.InputSchema.(map[string]any)
104+ if input, ok := b.tool.InputSchema.(map[string]any); ok {
102− required, _ := input["required"].([]string)
103− parameters, _ := input["properties"].(map[string]any)
105+ if props, ok := input["properties"].(map[string]any); ok {
108+ if req, ok := input["required"].([]any); ok {
109+ // Convert []any -> []string when elements are strings
110+ for _, v := range req {
111+ if s, ok := v.(string); ok {
112+ required = append(required, s)
115+ } else if reqStr, ok := input["required"].([]string); ok {
116+ // Handle case where it's already []string
104 return tools.ToolInfo{
121 return tools.ToolInfo{
105 Name: fmt.Sprintf("mcp_%s_%s", b.mcpName, b.tool.Name),
122 Name: fmt.Sprintf("mcp_%s_%s", b.mcpName, b.tool.Name),
106 Description: b.tool.Description,
123 Description: b.tool.Description,