Replies: 4 comments 1 reply
|
managed to get the "Mcp-Session-Id" from the request headers usign IHttpContextAccessor accessor. |
|
Hi. Can you provide an example of how you achieved to get the mcp-session-id during tool exection please? |
|
Hi, you can find an example below... For this to work, you have register HttpContextAccessor in your startup: and use the sse client not the streamable http client ... or configure streamable http to be stateless:
|
|
Thank you very much @kaniosm And in each tool i use this._httpContext to get the request headers |
Uh oh!
There was an error while loading. Please reload this page.
Pre-submission Checklist
Question Category
Your Question
Some of my tools are session dependent, how can I read the Mcp-Session-Id when the tool get executed?
All reactions