docs: fix the service example in the readme and examples/hello (#127)

Fix an example using mcp tag instead of jsonschema.
This commit is contained in:
Qihang Hu 2025-07-14 23:39:30 +08:00 • committed by GitHub
commit bf7e518215
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {