From bf7e518215fff7cf505c4a40f5d1a2843d0c63be Mon Sep 17 00:00:00 2001 From: Qihang Hu Date: Mon, 14 Jul 2025 23:39:30 +0800 Subject: [PATCH] docs: fix the service example in the readme and examples/hello (#127) Fix an example using mcp tag instead of jsonschema. --- README.md | 2 +- examples/hello/main.go | 2 +- internal/readme/server/server.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 45b16f9..037885e 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ import ( ) type HiParams struct { - Name string `json:"name", mcp:"the name of the person to greet"` + Name string `json:"name" jsonschema:"the name of the person to greet"` } func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) { diff --git a/examples/hello/main.go b/examples/hello/main.go index 84cff1e..f01a6c9 100644 --- a/examples/hello/main.go +++ b/examples/hello/main.go @@ -19,7 +19,7 @@ import ( var httpAddr = flag.String("http", "", "if set, use streamable HTTP at this address, instead of stdin/stdout") type HiArgs struct { - Name string `json:"name" mcp:"the name to say hi to"` + Name string `json:"name" jsonschema:"the name to say hi to"` } func SayHi(ctx context.Context, ss *mcp.ServerSession, params *mcp.CallToolParamsFor[HiArgs]) (*mcp.CallToolResultFor[struct{}], error) { diff --git a/internal/readme/server/server.go b/internal/readme/server/server.go index 7c02541..8901e77 100644 --- a/internal/readme/server/server.go +++ b/internal/readme/server/server.go @@ -13,7 +13,7 @@ import ( ) type HiParams struct { - Name string `json:"name", mcp:"the name of the person to greet"` + Name string `json:"name" jsonschema:"the name of the person to greet"` } func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) {