fastmcp/tests/server/middleware
Jeremiah Lowin 0f8d1b9e26
[3.x] Resolve injected tools through the server's tool lookup (#5432)
Backports `security/injected-tool-authorization` from main. Tools from `ToolInjectionMiddleware` are listed and resolved by the server's tool lookup, so a tool's `auth` check and every middleware in the chain, including `AuthMiddleware`, apply to them as they do to registered tools, wherever the injection middleware sits. Injected tools also follow their task configuration like registered tools. This also covers the deprecated `PromptToolMiddleware` and `ResourceToolMiddleware`, which build on `ToolInjectionMiddleware`.

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-04 10:39:55 -04:00
..
__init__.py Add single-component methods 2025-06-18 19:47:19 -04:00
test_caching.py Let ToolResult return an error result via is_error (#4217) 2026-05-22 20:20:52 -04:00
test_dereference.py Make $ref dereferencing optional via FastMCP(dereference_refs=...) (#3151) 2026-02-11 13:45:37 -05:00
test_error_handling.py Fix RetryMiddleware not retrying tool errors (#3858) 2026-04-13 20:08:04 -04:00
test_initialization_middleware.py fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
test_logging.py Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
test_middleware.py Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
test_middleware_nested.py fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
test_ping.py Fix ty ignore syntax in OpenAPI provider (#3253) 2026-02-20 18:06:43 -05:00
test_rate_limiting.py Fix: async rate limiting middleware get_client_id callbacks (#4319) 2026-06-24 10:27:30 -04:00
test_response_limiting.py fix: ResponseLimitingMiddleware no longer breaks outputSchema tools (#3756) 2026-04-05 10:36:38 -04:00
test_timing.py Consolidate test fixtures and refactor large test files (#2941) 2026-01-19 15:18:35 -05:00
test_tool_injection.py [3.x] Resolve injected tools through the server's tool lookup (#5432) 2026-10-04 10:39:55 -04:00