From 7fdf63310d06fa8aada666961a84102e87bda3b4 Mon Sep 17 00:00:00 2001 From: xbingW Date: Wed, 9 Apr 2025 18:15:56 +0800 Subject: [PATCH] fix: tml --- mcp_go/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mcp_go/README.md b/mcp_go/README.md index 7648933..ef7731a 100644 --- a/mcp_go/README.md +++ b/mcp_go/README.md @@ -146,6 +146,10 @@ type ToolParams struct { Param2 int `json:"param2" desc:"parameter description" required:"false"` } +type ToolResult struct { + Field1 string `json:"field1"` +} + func (t *ToolName) Name() string { return "tool_name" } @@ -159,7 +163,7 @@ func (t *ToolName) Validate(params ToolParams) error { return nil } -func (t *ToolName) Execute(ctx context.Context, params ToolParams) (interface{}, error) { +func (t *ToolName) Execute(ctx context.Context, params ToolParams) (result ToolResult, err error) { // Tool execution logic return result, nil }