fastmcp/tests/server
strawgate 21db5c6cc0
OTEL: Instrument list operations and add method to delegate spans
- Add server_span wrappers to list_tools, list_resources,
  list_resource_templates, and list_prompts in FastMCP server
- Add client_span wrappers to list_tools_mcp, list_resources_mcp,
  list_resource_templates_mcp, and list_prompts_mcp in client mixins
- Add optional `method` parameter to delegate_span in telemetry.py
  and set mcp.method.name on delegate spans
- Update all delegate_span callers in fastmcp_provider.py to pass
  the MCP method name (tools/call, resources/read, prompts/get)
- Add tests for new server list spans, client list spans, and
  delegate span method attributes

Refs: #3887

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 18:06:24 -05:00
..
auth AuthKit: auto-bind token audience to resource URL (RFC 8707) (#3905) 2026-04-13 17:11:17 -04:00
http fix: remove stale ty:ignore directives for ty 0.0.26 (#3684) 2026-03-28 20:02:40 -04:00
middleware Fix RetryMiddleware not retrying tool errors (#3858) 2026-04-13 20:08:04 -04:00
mount Fix wildcard resource template params in mounted servers (#3899) 2026-04-13 11:25:51 -04:00
providers fix: ProxyTool crashes on non-TextContent error responses (#3926) 2026-04-14 12:10:23 -04:00
sampling Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
tasks Scope tasks to authorization context, not session (#3800) 2026-04-13 13:50:43 -04:00
telemetry OTEL: Instrument list operations and add method to delegate spans 2026-04-14 18:06:24 -05:00
transforms Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
versioning Fix get_* returning None when latest version is disabled (#3439) 2026-03-07 11:55:10 -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 Split large test files to comply with loq line limit (#3328) 2026-02-28 11:21:11 -05:00
test_auth_integration_errors.py Split large test files to comply with loq line limit (#3328) 2026-02-28 11:21:11 -05:00
test_context.py Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
test_dependencies.py Bump pydocket>=0.19.0, drop fakeredis pin (#3822) 2026-04-10 13:41:18 -04:00
test_dependencies_advanced.py Replace vendored DI with uncalled-for (#3301) 2026-03-02 16:35:15 -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_fastapi_testclient_compat.py fix: FastAPI TestClient compatibility and lifespan re-initialization (#3736) 2026-04-06 19:53:27 -04: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 Fix high-severity test quality issues (#3854) 2026-04-12 13:14:52 -04: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 Bound client auto-pagination loops to prevent unbounded list fetches (#3411) 2026-03-06 17:43:47 -05:00
test_providers.py Replace ___ with hash-based backend tool routing and per-tool prefab resources (#3824) 2026-04-12 12:52:07 -04:00
test_server.py fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04: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 Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
test_server_safety.py fix: reject self-mount to prevent infinite recursion (#3925) 2026-04-14 12:10:19 -04: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 fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
test_tool_transformation.py Normalize repo references to PrefectHQ/fastmcp casing (#3218) 2026-02-18 14:51:18 -05:00