We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2835e8c commit 3246d9cCopy full SHA for 3246d9c
cmd/src/mcp.go
@@ -94,16 +94,20 @@ func mcpMain(args []string) error {
94
}
95
96
func printSchemas(tool *mcp.ToolDef) error {
97
- input, err := json.Marshal(tool.InputSchema)
98
- if err != nil {
99
- return err
+ var schema = struct {
+ Name string `json:"tool"`
+ Input any `json:"inputSchema"`
100
+ Output any `json:"outputSchema"`
101
+ }{
102
+ Name: tool.Name,
103
+ Input: tool.InputSchema,
104
+ Output: tool.OutputSchema,
105
- output, err := json.Marshal(tool.OutputSchema)
106
+ jsonVal, err := json.Marshal(schema)
107
if err != nil {
108
return err
109
-
- fmt.Printf("Input:\n%v\nOutput:\n%v\n", string(input), string(output))
110
+ fmt.Println(string(jsonVal))
111
return nil
112
113
0 commit comments