You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a case where I need to send some additional data (e.g. context data) along with tool arguments to MCP servers' tool calls using dotnet. The data I want to send is not static, it might change per request so I cannot send as HTTP headers because there isn't a way to set HTTP headers per tool call request as far as I know. Is there a way to handle this?
I saw #2290 and tried to write a custom middleware where I intercept tool calls to modify the request, but could not found a way to pass the additional data I want to send to middleware or a property in the request object to set the values to MCP tool call.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a case where I need to send some additional data (e.g. context data) along with tool arguments to MCP servers' tool calls using dotnet. The data I want to send is not static, it might change per request so I cannot send as HTTP headers because there isn't a way to set HTTP headers per tool call request as far as I know. Is there a way to handle this?
I saw #2290 and tried to write a custom middleware where I intercept tool calls to modify the request, but could not found a way to pass the additional data I want to send to middleware or a property in the request object to set the values to MCP tool call.
Beta Was this translation helpful? Give feedback.
All reactions