Skip to content

Commit 95a6163

Browse files
committed
Fix old toolResult format being used in TS exampel
Resolves modelcontextprotocol#80
1 parent 10a2dd0 commit 95a6163

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/concepts/tools.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ Here's an example of implementing a basic tool in an MCP server:
7373
if (request.params.name === "calculate_sum") {
7474
const { a, b } = request.params.arguments;
7575
return {
76-
toolResult: a + b
76+
content: [
77+
{
78+
type: "text",
79+
text: String(a + b)
80+
}
81+
]
7782
};
7883
}
7984
throw new Error("Tool not found");

0 commit comments

Comments
 (0)