Skip to content

Commit f3d0ada

Browse files
committed
get_time -> cityTime
1 parent f832730 commit f3d0ada

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/http/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func main() {
5656
}
5757
}
5858

59-
// GetTimeParams defines the parameters for the get_time tool
59+
// GetTimeParams defines the parameters for the cityTime tool
6060
type GetTimeParams struct {
6161
City string `json:"city" jsonschema:"City to get time for (nyc, sf, or boston)"`
6262
}
@@ -115,9 +115,9 @@ func runServer(host, port string) {
115115
Version: "1.0.0",
116116
}, nil)
117117

118-
// Add the get_time tool
118+
// Add the cityTime tool
119119
mcp.AddTool(server, &mcp.Tool{
120-
Name: "get_time",
120+
Name: "cityTime",
121121
Description: "Get the current time in NYC, San Francisco, or Boston",
122122
}, getTime)
123123

@@ -130,7 +130,7 @@ func runServer(host, port string) {
130130

131131
addr := fmt.Sprintf("%s:%s", host, port)
132132
log.Printf("MCP server listening on http://%s", addr)
133-
log.Printf("Available tool: get_time (cities: nyc, sf, boston)")
133+
log.Printf("Available tool: cityTime (cities: nyc, sf, boston)")
134134

135135
// Start the HTTP server with logging handler
136136
if err := http.ListenAndServe(addr, handlerWithLogging); err != nil {
@@ -174,14 +174,14 @@ func runClient(host, port string) {
174174
log.Printf(" - %s: %s\n", tool.Name, tool.Description)
175175
}
176176

177-
// Call the get_time tool for each city
177+
// Call the cityTime tool for each city
178178
cities := []string{"nyc", "sf", "boston"}
179179

180180
log.Println("Getting time for each city...")
181181
for _, city := range cities {
182182
// Call the tool
183183
result, err := session.CallTool(ctx, &mcp.CallToolParams{
184-
Name: "get_time",
184+
Name: "cityTime",
185185
Arguments: map[string]any{
186186
"city": city,
187187
},

0 commit comments

Comments
 (0)