Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(mcp): remove deprecated record-message/record-tool-call shims entirely

merged#2841CedarCopilot

CedarCopilot wants to merge 1 commit into staging from fix/remove-deprecated-record-shims

Live on prod, watching, 2 days leftTimeline and evidence
  1. Opened
    Sep 20, 2026, 11:28 AM
  2. Merged
    Sep 20, 2026, 11:31 AM
  3. Live on prod
    Sep 20, 2026, 11:31 AM
  4. Observed 0 hours
    Sep 20, 2026, 11:31 AM
  5. Watching

    Live on prod, watching, 2 days left

    Sep 20, 2026, 11:31 AM
  6. Pipelines steady after this deploy
    Sep 20, 2026, 11:31 AM
  7. Sep 20, 2026, 11:34 AM

Behaviors Libra is checking

Calls from stale MCP clients to `record-message` or `record-tool-call` are no longer silently acknowledged as no-ops and instead receive the MCP unknown-tool error.Not checked
prod
The external MCP server no longer advertises `record-message` or `record-tool-call` in `tools/list`.Not checked
prod

Libra has verdicts on 0 of 2 tracked behaviors on prod; 2 are still being checked. Libra checks hourly for 3 days after each deploy.

Summary

Manufact's readiness review flagged the same issue on these two no-op shims twice in a row now (most recently: "Add a type to this parameter: telemetry"). Instead of continuing to patch cosmetic schema findings on tools that exist purely for backward compat, checked whether anything actually still needs them.

Evidence

Queried Axiom (cedar-prod-logs) for external-mcp.tool_call events with toolId in (record-message, record-tool-call) over the trailing 90 days: zero calls, from either tool, from any caller. The public cedar-plugin repo's hooks that used to call them were already stripped when the intent-capture mechanism replaced them (2026-07-21), and no external MCP directory listing existed yet for any client to have a stale cached tools/list referencing them. There's no live caller left to protect.

Change

  • Deleted deprecated-record-shims.ts
  • Removed its import/registration call in server.ts
  • Removed the now-stale toolNames/schema assertions in external-mcp.e2e.test.ts
  • Added a dated note to docs/design/mcp-observability-and-plugin.md's existing resolution entry for these tools, recording why and when they were finally removed

Built on top of #2837 (fix/annotations-title), which merged to staging while this PR was in progress , retargeted at staging directly since that branch no longer exists. This diff contains only the new commit; #2837's changes are already on staging.

Verification

  • tsc -b clean
  • pnpm deps:check clean (no dependency violations, 1844 modules cruised)
  • Scoped vitest across 10 affected/adjacent test files: 312/312 passing

šŸ¤– Generated with Claude Code

RetriggerConfidence Score: 4/5

The code change appears safe to merge, with a non-blocking documentation inconsistency that should be corrected.

Findings

  1. P2Ā Impersonation Documentation Is Stale ā–¶
Fix with agent prompt
### Issue 1
docs/design/mcp-observability-and-plugin.md:357-361
This note says both deprecated tools are gone, but `docs/design/mcp-impersonation.md` still describes `record-message` and `record-tool-call` as active no-ops in impersonation mode. Update that section to describe the current `ephemeral` persistence behavior without relying on tools that no longer exist, so future maintainers are not misled.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR removes the deprecated record-message and record-tool-call compatibility shims from the external MCP server and updates discovery tests and observability documentation accordingly.

  • Deletes the no-op shim implementation and registration.
  • Updates the exact external MCP tool-list expectation.
  • Records the production-usage rationale for removing the compatibility layer.
  • Leaves one related impersonation design statement stale.

Reviews (1) Ā· Last reviewed commit: "fix(mcp): remove deprecated record-messa..."

Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files → surfaces

  • apps/server/src/mastra/mcp/external/deprecated-record-shims.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/server.tsno production surface mapped
  • apps/server/src/routes/__tests__/external-mcp.e2e.test.tsno production surface mapped
  • docs/design/mcp-observability-and-plugin.mdno production surface mapped