Successfully invoking tools again!
This commit is contained in:
parent
9cafc70e3b
commit
5a6b81f05f
1 changed files with 1 additions and 1 deletions
|
|
@ -403,7 +403,7 @@ export function useMcp(options: UseMcpOptions): UseMcpResult {
|
||||||
CallToolResultSchema, // Optional: Validate result against schema
|
CallToolResultSchema, // Optional: Validate result against schema
|
||||||
);
|
);
|
||||||
addLog('info', `Tool "${name}" call successful.`);
|
addLog('info', `Tool "${name}" call successful.`);
|
||||||
return result.result; // Assuming CallToolResultSchema has a `result` field
|
return result; // Assuming CallToolResultSchema has a `result` field
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
addLog('error', `Error calling tool "${name}": ${err instanceof Error ? err.message : String(err)}`);
|
addLog('error', `Error calling tool "${name}": ${err instanceof Error ? err.message : String(err)}`);
|
||||||
// TODO: Should specific JSON-RPC errors be handled differently?
|
// TODO: Should specific JSON-RPC errors be handled differently?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue