_meta information present in the CallToolRequest #405
vignesh1234567
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Question Category
Your Question
How can I access the _meta information present in the CallToolRequest and use it within the tool execution logic?
I need to send tokens through the _meta field and consume them during tool execution.
Currently, I'm using:
tool.call().apply(exchange, callToolRequest.arguments())
However, it seems that the full request (including _meta) isn't being passed through. Is there a way to retrieve the complete request, including the metadata?
private McpServerSession.RequestHandler toolsCallRequestHandler() {
return (exchange, params) -> {
McpSchema.CallToolRequest callToolRequest = objectMapper.convertValue(params,
new TypeReference<McpSchema.CallToolRequest>() {
});
Beta Was this translation helpful? Give feedback.
All reactions