Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 15 additions & 116 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sample-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
"@types/express": "^5.0.5",
"express": "^5.1.0",
"uuid": "^13.0.0",
"zod": "^3.25.76"
"zod": "^4.1.13"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested all work.

}
}
12 changes: 8 additions & 4 deletions sample-code/src/tutorials/mcp/weather-mcp-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
/* eslint-disable import/no-internal-modules */
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import * as z from 'zod/v3';
import * as z from 'zod';

const server = new McpServer({
name: 'Open-Meteo Weather MCP Server',
version: '1.0.0'
});

server.tool(
server.registerTool(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tool() deprecated, using registerTool() instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the line numbers changed a bit now, can you check if the referred line numbers in the documentation are still valid?

'get_weather',
'Tool to fetch weather details for a specific city',
{
city: z.string().describe('The name of the city to get the weather for')
description: 'Tool to fetch weather details for a specific city',
inputSchema: {
city: z
.string()
.meta({ description: 'The name of the city to get the weather for' })
}
},
async ({ city }) => {
try {
Expand Down
Loading