fastmcp/docs
Bill Easton 7184a4ca21
OTEL: Fix attribute compliance with MCP semantic conventions (#3889)
* OTEL: Fix attribute compliance and improve telemetry helpers

Attribute compliance:
- Remove rpc.system/service/method (MCP is not traditional RPC)
- Add gen_ai.tool.name on tools/call spans
- Add gen_ai.prompt.name on prompts/get spans
- Fix session_id check (truthy -> is not None)

Telemetry helper improvements:
- Add is_recording() guards to skip work on non-recording spans
- Add error.type attribute with __qualname__ on error spans
- Use isinstance check for ToolError to set "tool_error" error type
- Include exception message in span status description
- Add tool_name/prompt_name params to server_span and client_span

Client call_tool enrichment:
- Reflect tool-level errors (result.isError) on client span status
  so callers see ERROR even though the MCP protocol call succeeded

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove resource URI from span names to avoid high-cardinality

Per MCP semantic conventions, resource URIs SHOULD NOT be included in
span names by default since they can be unbounded (especially with
templates like users://{id}/profile). The URI remains available via
the mcp.resource.uri attribute.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add missing gen_ai/mcp attributes to proxy and delegate spans

- Proxy tool spans: add gen_ai.tool.name
- Proxy prompt spans: add gen_ai.prompt.name
- All delegate spans: add mcp.method.name
- Docs: remove rpc.* references, update span names and attributes table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Hoist ToolError imports to module level, add rpc.* migration note

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:28:47 -04:00
..
.cursor/rules Clean up parameter documentation 2025-06-22 20:59:53 -04:00
apps Overhaul apps docs (#3915) 2026-04-13 21:24:00 -04:00
assets Animated (#3231) 2026-02-19 11:56:51 -05:00
cli Add fastmcp dev apps command with browser UI preview (#3489) 2026-03-14 12:29:37 -04:00
clients Fix broken code examples in docs (#3869) 2026-04-12 12:53:04 -04:00
community Normalize repo references to PrefectHQ/fastmcp casing (#3218) 2026-02-18 14:51:18 -05:00
css Update docs banner and fix mobile layout 2026-03-03 14:34:49 -05:00
deployment Fix broken code examples in docs (#3869) 2026-04-12 12:53:04 -04:00
development Fix broken code examples in docs (#3869) 2026-04-12 12:53:04 -04:00
getting-started Fix broken code examples in docs (#3869) 2026-04-12 12:53:04 -04:00
integrations AuthKit: auto-bind token audience to resource URL (RFC 8707) (#3905) 2026-04-13 17:11:17 -04:00
more perf: reduce PBKDF2 iterations in tests, fix warnings and timeouts (#3504) 2026-03-14 16:42:06 -04:00
patterns Fix broken code examples in docs (#3869) 2026-04-12 12:53:04 -04:00
public/schemas/fastmcp.json chore: Update fastmcp.json schema (#1955) 2025-09-29 20:12:24 -04:00
python-sdk chore: Update SDK documentation (#3914) 2026-04-13 21:23:43 -04:00
servers OTEL: Fix attribute compliance with MCP semantic conventions (#3889) 2026-04-14 16:28:47 -04:00
snippets Overhaul apps docs (#3915) 2026-04-13 21:24:00 -04:00
tutorials Fix broken code examples in docs (#3869) 2026-04-12 12:53:04 -04:00
v2 Allow auth providers to override protected resource base URLs (#3900) 2026-04-13 13:36:55 -04:00
.ccignore Add comprehensive OAuth 2.1 authentication system with WorkOS integration (#1327) 2025-08-01 17:06:55 -04:00
changelog.mdx fix: broken link in changelog (#3775) 2026-04-06 21:16:01 -04:00
docs.json Overhaul apps docs (#3915) 2026-04-13 21:24:00 -04:00
fastmcp-analytics.js [codex] Add FastMCP docs telemetry (#3727) 2026-03-31 19:32:09 -04:00
python-sdk-pages.json chore: Update SDK documentation (#3901) 2026-04-13 14:00:07 -04:00
unify-intent.js Add tag to deployment pages (#3624) 2026-03-25 11:39:25 -04:00
updates.mdx Add release notes for v3.1.0, v3.1.1, and v2.14.6 (#3659) 2026-03-27 14:34:13 -04:00
v2-banner.js Update docs for 3.0 GA release (#3216) 2026-02-18 14:29:28 -05:00
v2-navigation.json chore: split v2 docs navigation into separate file (#3762) 2026-04-04 21:17:39 -04:00