mcp sdk 0.5.0 - is there a way to scope tool visibility per user or does every user see all registered tools
we have ~30 tools registered in our agent but different user roles should only see subsets. like admin users get database tools, regular users don't. does 0.5.0 support scoping tool visibility or do we need to build dynamic registration per session? tried reading the sdk docs but couldn't find anything about access control or tool filtering
every user sees all tools in 0.5.0, no scoping at all. we had to build a wrapper that filters tool lists by user role before registration which is.... not great but it works. added like 200ms latency tho
we did the exact same wrapper and hit the exact same latency hit. 200ms if you're lucky, 400ms if you're doing proper cleanup. the real killer is you can't even batch the filtering because tool registration happens at startup and user context doesn't exist yet
200ms latency per request is unacceptable for prod tool routing