Merge pull request #82 from modelcontextprotocol/justin/fix-bugs

Fix minor docs bugs
This commit is contained in:
Justin Spahr-Summers 2024-12-17 20:16:55 +00:00 • committed by GitHub
commit 1dc8718527
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -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");

View file

@ -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"
]
}
}