Skip to content

feat(mcp): add tool-call structured logger (#373 stack 3/3)#377

Draft
adriannoes wants to merge 1 commit into
feat/373-request-log-middlewarefrom
feat/373-tool-call-logger
Draft

feat(mcp): add tool-call structured logger (#373 stack 3/3)#377
adriannoes wants to merge 1 commit into
feat/373-request-log-middlewarefrom
feat/373-tool-call-logger

Conversation

@adriannoes

@adriannoes adriannoes commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Part of #373 (stack 3/3).

Summary

  • Lands the user-facing CHANGELOG entry for hosted structured logging (Structured request and tool logging #373).
  • Adds an in-process e2e that locks HTTP↔tool request_id correlation under stateful Streamable HTTP (D4), using #378's tool_log_middleware + the shared structured emitter from stacks 1–2.

What this PR deliberately does not do

Stack status

Test plan

  • uv run pytest packages/mcp/tests/observability/test_observability_end_to_end.py -q
  • uv run ruff check packages/mcp && uv run ruff format --check packages/mcp

Stack 3/3 no longer adds a second CallToolRequest tool logger: #378's
tool_log_middleware already emits through the shared structured emitter.
Keep the correlation e2e (adapted to stderr + middleware) and the user-facing
changelog entry for #373.
@adriannoes adriannoes force-pushed the feat/373-tool-call-logger branch from 43c1c93 to 5b0a506 Compare July 9, 2026 18:44
@adriannoes

Copy link
Copy Markdown
Collaborator Author

Stack 3/3 reshaped after #378 landed in dev

#378 already provides the tool-call middleware seam + tool_log_middleware. Duplicating that with a second CallToolRequest wrap (tool_call_logger.py) would emit two tool_call lines per invocation.

This PR is now slimmed on top of #376:

Cross-refs: #375 (emitter) → #376 (HTTP middleware + pin + unify) → this PR (docs + e2e lock).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant