Skip to content

Commit 3fb2032

Browse files
authored
uprev mcp typescript library (#12)
1 parent 27df0e7 commit 3fb2032

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

mcp_run_python/deno/deno.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
"format": "deno fmt"
1616
},
1717
"imports": {
18-
"@modelcontextprotocol/sdk": "npm:@modelcontextprotocol/sdk@^1.15.1",
18+
"@modelcontextprotocol/sdk": "npm:@modelcontextprotocol/sdk@^1.17.5",
1919
"@std/cli": "jsr:@std/cli@^1.0.15",
2020
"@std/path": "jsr:@std/path@^1.0.8",
2121
// do NOT upgrade above this version until there is a workaround for https://github.com/pyodide/pyodide/pull/5621
2222
"pyodide": "npm:pyodide@0.27.6",
23-
"zod": "npm:zod@^3.24.2"
23+
"zod": "npm:zod@^3.24.4"
2424
},
2525
"fmt": {
2626
"lineWidth": 120,

mcp_run_python/deno/deno.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcp_run_python/deno/src/main.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,17 @@ The code will be executed with Python 3.12.
8686
return {}
8787
})
8888

89-
server.tool(
89+
server.registerTool(
9090
'run_python_code',
91-
toolDescription,
9291
{
93-
python_code: z.string().describe('Python code to run'),
94-
global_variables: z.record(z.string(), z.any()).default({}).describe(
95-
'Map of global variables in context when the code is executed',
96-
),
92+
title: 'Run Python code',
93+
description: toolDescription,
94+
inputSchema: {
95+
python_code: z.string().describe('Python code to run'),
96+
global_variables: z.record(z.string(), z.any()).default({}).describe(
97+
'Map of global variables in context when the code is executed',
98+
),
99+
},
97100
},
98101
async ({ python_code, global_variables }: { python_code: string; global_variables: Record<string, any> }) => {
99102
const logPromises: Promise<void>[] = []

0 commit comments

Comments
 (0)