Skip to content

Commit cf182d7

Browse files
authored
Merge pull request modelcontextprotocol#296 from cloudmoonocus/docs/fix-typescript-demo
docs: modify the TypeScript server demo
2 parents 2d8014a + 834c131 commit cf182d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/quickstart/server.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In this tutorial, we'll build a simple MCP weather server and connect it to a ho
99

1010
Many LLMs do not currently have the ability to fetch the forecast and severe weather alerts. Let's use MCP to solve that!
1111

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):
1313

1414
<Frame>
1515
<img src="/images/weather-alerts.png" />
@@ -543,7 +543,7 @@ The tool execution handler is responsible for actually executing the logic of ea
543543
```typescript
544544
// Register weather tools
545545
server.tool(
546-
"get-alerts",
546+
"get_alerts",
547547
"Get weather alerts for a state",
548548
{
549549
state: z.string().length(2).describe("Two-letter state code (e.g. CA, NY)"),
@@ -591,7 +591,7 @@ server.tool(
591591
);
592592

593593
server.tool(
594-
"get-forecast",
594+
"get_forecast",
595595
"Get weather forecast for a location",
596596
{
597597
latitude: z.number().min(-90).max(90).describe("Latitude of the location"),

0 commit comments

Comments
 (0)