You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/quickstart/server.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ In this tutorial, we'll build a simple MCP weather server and connect it to a ho
9
9
10
10
Many LLMs do not currently have the ability to fetch the forecast and severe weather alerts. Let's use MCP to solve that!
11
11
12
-
We'll build a server that exposes two tools: `get-alerts` and `get-forecast`. Then we'll connect the server to an MCP host (in this case, Claude for Desktop):
12
+
We'll build a server that exposes two tools: `get_alerts` and `get_forecast`. Then we'll connect the server to an MCP host (in this case, Claude for Desktop):
13
13
14
14
<Frame>
15
15
<imgsrc="/images/weather-alerts.png" />
@@ -543,7 +543,7 @@ The tool execution handler is responsible for actually executing the logic of ea
543
543
```typescript
544
544
// Register weather tools
545
545
server.tool(
546
-
"get-alerts",
546
+
"get_alerts",
547
547
"Get weather alerts for a state",
548
548
{
549
549
state: z.string().length(2).describe("Two-letter state code (e.g. CA, NY)"),
@@ -591,7 +591,7 @@ server.tool(
591
591
);
592
592
593
593
server.tool(
594
-
"get-forecast",
594
+
"get_forecast",
595
595
"Get weather forecast for a location",
596
596
{
597
597
latitude: z.number().min(-90).max(90).describe("Latitude of the location"),
0 commit comments