From 95a616325ee53523c2aa2540e2975acdbd9065ae Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Tue, 17 Dec 2024 15:05:27 +0000 Subject: [PATCH 1/2] Fix old `toolResult` format being used in TS exampel Resolves #80 --- docs/concepts/tools.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/concepts/tools.mdx b/docs/concepts/tools.mdx index 17cc10c..45eb4ec 100644 --- a/docs/concepts/tools.mdx +++ b/docs/concepts/tools.mdx @@ -73,7 +73,12 @@ Here's an example of implementing a basic tool in an MCP server: if (request.params.name === "calculate_sum") { const { a, b } = request.params.arguments; return { - toolResult: a + b + content: [ + { + type: "text", + text: String(a + b) + } + ] }; } throw new Error("Tool not found"); From 959e73dcf0eddb80bfa93b9537ba7f16ae15eeae Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Tue, 17 Dec 2024 15:08:10 +0000 Subject: [PATCH 2/2] Fix Windows path backslash escaping Resolves #81 --- quickstart.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickstart.mdx b/quickstart.mdx index 3dc2c69..03e6013 100644 --- a/quickstart.mdx +++ b/quickstart.mdx @@ -453,7 +453,7 @@ In this case, we'll add our single weather server like so: "command": "uv", "args": [ "--directory", - "C:\\ABSOLUTE\PATH\TO\PARENT\FOLDER\weather", + "C:\\ABSOLUTE\\PATH\\TO\\PARENT\\FOLDER\\weather", "run", "weather" ] @@ -974,7 +974,7 @@ In this case, we'll add our single weather server like so: "weather": { "command": "node", "args": [ - "C:\\PATH\TO\PARENT\FOLDER\weather\build\index.js" + "C:\\PATH\\TO\\PARENT\\FOLDER\\weather\\build\\index.js" ] } }