-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Is your feature request related to a problem? Please describe.
I was working on an MCP client using the typescript SDK and saw toolResult as something I could get back from callTool(), but after opening this issue I was informed that toolResult is no longer a thing in the spec.
Describe the solution you'd like
I would like a non-chat-content way for tools to return the tool result, this discussion is sort of touching on the same problem, maybe the LLM doesn't necessarily need the full tool result in the chat - maybe the client can choose to use it differently?
I realize that simply an arbitrary "result" field is not a great solution in a spec and maybe that's why it was dropped, but having only one thing to return to the caller - the "chat history" - is very limiting. if toolResult: any is the temporary solution - I still think it has uses (if only for inspector-like tools).
return {
toolResult: results, // raw result object
content: [
{
type: 'text',
text: formattedResults, // formatted as chat-message
},
],
isError: false,
};Thanks