Summary
When servers expose a large number of tools, clients often need a filtered tools/list response based on request-scoped security and policy context (for example tenant, user permissions, and metadata headers).
In streamable HTTP mode, we need a supported way to customize tools/list results per request while still using the SDK-managed transport/session pipeline.
Current limitation
Built-in tools/list handling does not provide a clear per-request customization hook for filtering the returned tool set.
As a result, applications may need to bypass SDK handling and implement manual interception/response logic.
Why this matters
- Security: hide tools the caller is not authorized to see.
- Scalability/UX: reduce very large tool catalogs to relevant subsets.
- Multi-tenant correctness: tenant/user-specific visibility.
- Consistency: keep all methods on the same streamable transport path.
Requested capability
Please add one of the following supported extension points:
- A pluggable handler override for built-in
tools/list.
- Middleware/interceptor API that can transform
tools/list results per request.
- A dedicated
tools/list filter callback with access to request/exchange context and full tool list.
Expected outcome
Applications can apply per-request security/policy filtering for tools/list without bypassing streamable transport behavior.
Compatibility
No breaking change required. Default behavior should remain unchanged if no custom filter/handler is registered.
Related issues
Summary
When servers expose a large number of tools, clients often need a filtered
tools/listresponse based on request-scoped security and policy context (for example tenant, user permissions, and metadata headers).In streamable HTTP mode, we need a supported way to customize
tools/listresults per request while still using the SDK-managed transport/session pipeline.Current limitation
Built-in
tools/listhandling does not provide a clear per-request customization hook for filtering the returned tool set.As a result, applications may need to bypass SDK handling and implement manual interception/response logic.
Why this matters
Requested capability
Please add one of the following supported extension points:
tools/list.tools/listresults per request.tools/listfilter callback with access to request/exchange context and full tool list.Expected outcome
Applications can apply per-request security/policy filtering for
tools/listwithout bypassing streamable transport behavior.Compatibility
No breaking change required. Default behavior should remain unchanged if no custom filter/handler is registered.
Related issues