fastmcp/tests/server
Jeremiah Lowin c96c0400f3
feat: Search transforms for tool discovery (#3154)
* feat: Add search transforms for tool discovery

RegexSearchTransform and BM25SearchTransform collapse large tool
catalogs into a search interface so LLMs discover tools on demand
instead of receiving the full listing.

* chore: Update SDK documentation

* fix: call_tool recursion guard, atomic BM25 rebuild, hash includes descriptions

* Extract CatalogTransform base class for catalog-aware transforms

Transforms that replace list_tools() with synthetic components (like
search) need to read the real catalog at call time without triggering
their own replacement logic. CatalogTransform handles the re-entrant
bypass via per-instance ContextVar, exposing transform_tools() as the
subclass hook and get_tool_catalog() for catalog access.

* Add search transform examples for regex and BM25

* Add README for search transform examples

* Polish search example clients with rich output

* Remove hardcoded tool counts from search example subtitles

* Clarify that review bot feedback should be evaluated on its merits

* Expand search transform docs with proper hierarchy

---------

Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-02-26 22:42:38 -05:00
..
auth Add in-memory caching for token introspection results (#3298) 2026-02-26 10:43:40 -05:00
http Fix ty 0.0.17 diagnostics and bump lockfile 2026-02-16 16:13:38 -05:00
middleware Fix ty 0.0.19 type errors (#3310) 2026-02-26 16:08:40 -05:00
mount Normalize repo references to PrefectHQ/fastmcp casing (#3218) 2026-02-18 14:51:18 -05:00
providers Preserve skill metadata through provider wrapping (#3237) 2026-02-19 12:24:39 -05:00
sampling Add helpers for converting FunctionTool and TransformedTool to SamplingTool (#3062) 2026-02-11 19:43:03 -06:00
tasks fix: propagate origin_request_id to background task workers (#3175) 2026-02-22 11:16:30 -05:00
telemetry Fix ty 0.0.17 diagnostics and bump lockfile 2026-02-16 16:13:38 -05:00
transforms feat: Search transforms for tool discovery (#3154) 2026-02-26 22:42:38 -05:00
versioning Fix ty 0.0.17 diagnostics and bump lockfile 2026-02-16 16:13:38 -05:00
__init__.py restore 1.x code 2025-04-09 11:54:42 -04:00
test_app_state.py Update docs and test 2025-06-20 13:06:48 -04:00
test_auth_integration.py Update FastMCP for MCP SDK 1.23.1 auth changes 2025-12-03 11:50:08 -05:00
test_context.py Support non-serializable values in Context.set_state (#3171) 2026-02-12 15:06:42 -06:00
test_dependencies.py Fix ty 0.0.19 type errors (#3310) 2026-02-26 16:08:40 -05:00
test_event_store.py Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
test_file_server.py Add MCP-compliant pagination for list operations 2026-01-17 19:30:24 -05:00
test_icons.py Implement icon support (#2121) 2025-10-17 17:28:08 -04:00
test_input_validation.py Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
test_log_level.py Refactor server.py into mixins (#2939) 2026-01-19 11:36:00 -05:00
test_logging.py Refactor server.py into mixins (#2939) 2026-01-19 11:36:00 -05:00
test_pagination.py fix: guard client pagination loops against misbehaving servers (#3167) 2026-02-12 13:19:02 -06:00
test_providers.py Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
test_run_server.py Update tests for prompts 2025-06-04 16:37:41 -04:00
test_server.py Expose local_provider property, deprecate FastMCP.remove_tool() (#3155) 2026-02-11 19:37:19 -06:00
test_server_docket.py Make pydocket optional and unify DI systems (#2835) 2026-01-10 16:23:32 -05:00
test_server_lifespan.py fix: broaden combine_lifespans type to accept Mapping return types (#3005) 2026-01-28 15:54:59 -05:00
test_session_visibility.py Fix session visibility marks leaking across sessions (#3132) 2026-02-10 11:42:43 -05:00
test_streamable_http_no_redirect.py Improve redirect handling to address 307's (#1387) 2025-08-08 11:55:30 -04:00
test_tool_annotations.py Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
test_tool_transformation.py Normalize repo references to PrefectHQ/fastmcp casing (#3218) 2026-02-18 14:51:18 -05:00