Skip to content

Commit bf7e518

Browse files
authored
docs: fix the service example in the readme and examples/hello (#127)
Fix an example using mcp tag instead of jsonschema.
1 parent a26e1dc commit bf7e518

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ import (
109109
)
110110

111111
type HiParams struct {
112-
Name string `json:"name", mcp:"the name of the person to greet"`
112+
Name string `json:"name" jsonschema:"the name of the person to greet"`
113113
}
114114

115115
func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) {

examples/hello/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
var httpAddr = flag.String("http", "", "if set, use streamable HTTP at this address, instead of stdin/stdout")
2020

2121
type HiArgs struct {
22-
Name string `json:"name" mcp:"the name to say hi to"`
22+
Name string `json:"name" jsonschema:"the name to say hi to"`
2323
}
2424

2525
func SayHi(ctx context.Context, ss *mcp.ServerSession, params *mcp.CallToolParamsFor[HiArgs]) (*mcp.CallToolResultFor[struct{}], error) {

internal/readme/server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
type HiParams struct {
16-
Name string `json:"name", mcp:"the name of the person to greet"`
16+
Name string `json:"name" jsonschema:"the name of the person to greet"`
1717
}
1818

1919
func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) {

0 commit comments

Comments
 (0)