Prerequisites
What are you trying to do that currently feels hard or impossible?
The server needs client identity and user-provided metadata (model, user ID, agent ID) on tools/call to propagate into database query logs via SQLCommenter. Currently _meta only carries traceparent/tracestate
Suggested Solution(s)
- Add telemetry_attributes to MCPMeta with serialization alias
dev.mcp-toolbox/telemetry.
- Accept at call time: pop telemetry_attributes from kwargs before signature validation:
- Build payload in transport: always include
client.name + client.version from transport state; merge user-provided attrs with client. prefix. Attach to _meta on every tools/call
Alternatives Considered
No response
Additional Details
- Only tools/call affected for v1, and telemetry attributes are directly passed to the server.
- An extension to the project will be to enable the same telemetry in
initialize and tools/list, and export them with current telemetry as well
Prerequisites
What are you trying to do that currently feels hard or impossible?
The server needs client identity and user-provided metadata (model, user ID, agent ID) on tools/call to propagate into database query logs via SQLCommenter. Currently
_metaonly carriestraceparent/tracestateSuggested Solution(s)
dev.mcp-toolbox/telemetry.client.name + client.versionfrom transport state; merge user-provided attrs withclient.prefix. Attach to_metaon everytools/callAlternatives Considered
No response
Additional Details
initializeandtools/list, and export them with current telemetry as well