Skip to content

feat(client): add privacy-safe request history#59

Open
Ritwij Aryan Parmar (RitwijParmar) wants to merge 1 commit into
dedalus-labs:mainfrom
RitwijParmar:codex/dedalus-client-request-history
Open

feat(client): add privacy-safe request history#59
Ritwij Aryan Parmar (RitwijParmar) wants to merge 1 commit into
dedalus-labs:mainfrom
RitwijParmar:codex/dedalus-client-request-history

Conversation

@RitwijParmar

Copy link
Copy Markdown

Summary

Adds a bounded request history on MCPClient so client users can debug slow, failed, or repeated MCP calls without retaining request payloads, tool arguments, resource URIs, prompt arguments, or result bodies.

The history records method, result type, session id, duration, success or failure, and error class/message. Convenience methods still call the underlying ClientSession helpers, with metadata recorded around those calls.

Why

When MCP apps run multiple tools or remote sessions, the current client surface makes it hard to answer simple questions like which request failed, how long it took, and whether the same operation repeated. This gives that debugging surface while keeping sensitive tool arguments out of memory snapshots and logs.

Testing

  • uv run pytest tests/test_client.py --no-cov
  • uv run ruff check --select I,RUF022 src/dedalus_mcp/client/__init__.py src/dedalus_mcp/client/core.py src/dedalus_mcp/client/diagnostics.py
  • uv run ruff check --select D202,EM,TRY src/dedalus_mcp/client/diagnostics.py

uv run mypy src/dedalus_mcp/client could not run locally because mypy is not installed in the environment.

AI assistance was used to prepare this PR. I reviewed the code and tests before submitting.

Signed-off-by: Ritwij Aryan Parmar <ritwij.aryan.parmar@gmail.com>
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