feat: Add DataSchema tool for retrieving schema information from CSV and Excel files

This commit is contained in:
begoniezhao
2025-12-23 16:56:30 +08:00
parent ddf5ae4e65
commit 907e9a5522
51 changed files with 2784 additions and 1307 deletions
+2 -12
View File
@@ -245,21 +245,11 @@ func (c *mcpGoClient) ListTools(ctx context.Context) ([]*types.MCPTool, error) {
// Convert to our types
tools := make([]*types.MCPTool, len(result.Tools))
for i, tool := range result.Tools {
// Convert InputSchema
var inputSchema map[string]interface{}
// Convert InputSchema to map
data, err := json.Marshal(tool.InputSchema)
if err == nil {
var schemaMap map[string]interface{}
if err := json.Unmarshal(data, &schemaMap); err == nil {
inputSchema = schemaMap
}
}
data, _ := json.Marshal(tool.InputSchema)
tools[i] = &types.MCPTool{
Name: tool.Name,
Description: tool.Description,
InputSchema: inputSchema,
InputSchema: data,
}
}