Skip to content

Commit 5ae2921

Browse files
antonpk1claude
andauthored
Remove temporary JSON-RPC envelope unwrapping hack (#90)
The host implementation has been fixed to return the correct result format, so this workaround is no longer needed. Reverts the hack added in #82. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 3aa93db commit 5ae2921

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/app.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -597,17 +597,11 @@ export class App extends Protocol<Request, Notification, Result> {
597597
params: CallToolRequest["params"],
598598
options?: RequestOptions,
599599
): Promise<CallToolResult> {
600-
const response = await this.request(
600+
return await this.request(
601601
{ method: "tools/call", params },
602602
CallToolResultSchema,
603603
options,
604604
);
605-
// TEMPORAL HACK: Some host implementations incorrectly return the full
606-
// JSON-RPC envelope instead of just the result. Unwrap if needed.
607-
if (response && "result" in response && "jsonrpc" in response) {
608-
return (response as unknown as { result: CallToolResult }).result;
609-
}
610-
return response;
611605
}
612606

613607
/**

0 commit comments

Comments
 (0)