tracetrim
tracetrim learns from traces which tool output fields an agent visibly reuses and trims the rest. The expand tool returns a retained origina
tracetrim learns from traces which tool output fields an agent visibly reuses and trims the rest. The expand tool returns a retained original result. The tracetrim_done tool closes a run with the agent's final answer. When tracetrim fronts other MCP servers, Guard sees one server. Proxied tools keep Guard's normal handling.
mcp.tracetrim · v1.0.0 · Specialized tools
- Protection rules
- 0
- Permission checks
- 1
- Mapped commands
- 1
Overview
What this coverage does
tracetrim learns from traces which tool output fields an agent visibly reuses and trims the rest. The expand tool returns a retained original result. The tracetrim_done tool closes a run with the agent's final answer. When tracetrim fronts other MCP servers, Guard sees one server. Proxied tools keep Guard's normal handling.
Key facts
- Catalog ID
mcp.tracetrim- Version
- v1.0.0
- Kind
- MCP server
- Category
- Specialized tools
- Protection rules
- 0
- Permission checks
- 1
- Mapped commands
- 1
- Maintainer
- Community contributor(community, provenance recorded)
- Source commit
- 5c5a0f7
- Protection model
- External · opt-in
External coverage. It must be enabled through Guard controls; this page does not activate it.
Stated limits
- Coverage is limited to the reviewed operations and the surrounding Guard policy.
- A maintainer profile is not a security certification or an official upstream endorsement.
Command mapping
Every command this extension recognizes, with the catalog default floor Guard applies before workspace policy. Search the table, then open an operation for safe variants and the permission ID.
No per-command matchers are published for this listing. Coverage is described by the reviewed rule count, permission checks, and the surrounding Guard policy.
Tool state mapping
| Tool | Guard state |
|---|---|
| expand | Inherit policy |
| tracetrim_done | Inherit policy |
| other | Inherit policy |
Runtime identity
- Catalog ID
- mcp.tracetrim
- Guard enforcement ID
- command.mcp-tracetrim
- Source path
- contributions/mcp-servers/mcp.tracetrim.json
- Contribution digest
sha256…029b02
Mapped executables
uvxAction classes
mcp tracetrim toolTechnical profile
Independent technical profile
- Profile content digest
- sha256:bc02d54f723a26669b1182de2b18e1f1938d54e21fc82e428afbd1036f817e17
- Profile source SHA
- f022c4b89929e0824168985d56f70ab9e5a7c6e5
- Source version
- 1.0.0
- Native source path
- contributions/mcp-servers/mcp.tracetrim.json
- Native extension ID
- mcp.tracetrim
- Runtime extension ID
- command.mcp-tracetrim
- Contribution digest
- sha256:7e95bf7cb136935e8ccc32537dd4589e0c233889e79674d9af6c7fd603029b02
- Source contract fingerprint
- sha256:28490b19a50092cbfa725805512f9b5dac5958ea6910608d75fee33cbb0d2e5a
Native contribution
Supported by reviewed source projectionSource version
Supported by reviewed source projectionRuntime capability
Supported by reviewed source projectionPermissions
Supported by reviewed source projectionThe reviewed catalog declares 1 extension permission(s).
- expand: inherit
- tracetrim_done: inherit
- other: inherit
Harness support
Unknown / self-reportedContributor-supplied harness support text is not independently verified. Checked end to end with HOL Guard 3.61.0, Claude Code 2.1.329 and tracetrim 1.4.0 on Linux, against a local test server: per-tool Block and Allow on tools reached through tracetrim reached Guard's hook. tracetrim init also writes entries for Claude Desktop, Cursor and VS Code, but Guard's per-tool path through tracetrim has been checked only with Claude Code.
- Claude Code on Linux, with HOL Guard 3.61.0: per-tool Block and Allow through tracetrim verified against a local test server.
- Claude Code on Windows and VS Code (folder opened from WSL): tracetrim init, tools passing and tracetrim_done verified by tracetrim's author; not checked with Guard.
- Claude Desktop and Cursor: tracetrim init writes the entry in the documented format; not verified, with or without Guard.
- MCP servers reached over stdio or HTTP, with headers or OAuth (OAuth needs tracetrim login once after init). Claude Desktop extensions (.mcpb) and connectors added from Settings are not seen by init.
Prerequisites
Unknown / self-reportedContributor-supplied prerequisite text is not independently verified. Reviewed documentation: https://github.com/hashgraph-online/hol-guard/blob/main/docs/guard/extensions/README.md
- Python 3.10 or later, and HOL Guard installed with its Claude Code hook.
- Claude Code with at least one MCP server in the project's .mcp.json (tracetrim init uses the project's file for Claude Code by default; for servers added with --scope user it prints the steps instead of writing).
- A project where you can try a harmless, read-only tool first, before pointing tracetrim at servers that write or delete.
Expected outcomes
Unknown / self-reportedContributor-supplied expected-outcome text is not independently verified. With Block, Claude Code reports that Guard denied the call, and the upstream server receives no request; in our check the decision was deny / block, reason native_custom_mcp_tool_block. With Allow, the call reaches the server once. During the first 5 runs results arrive whole (compact JSON only); after that, a trimmed result ends with a line naming the hidden fields, with the first words of hidden free-text fields, and the agent can call expand to get any of them back. tracetrim's report is kept up to date in the work directory (report.html).
Limitations
Supported by reviewed source projectionLimitations are copied from the reviewed catalog facts. Contributor-supplied limitation notes are not independently verified. Coverage limits declared in the reviewed catalog appear automatically when this guide is published.
- Coverage is limited to the reviewed operations and the surrounding Guard policy.
- A maintainer profile is not a security certification or an official upstream endorsement.
- tracetrim is not a security control: Guard does not see what tracetrim removes from a result, and expand can return any hidden field in full.
- A tool appears in "Claude Code · observed tools" only after Claude Code has attempted it once; until then it keeps Guard's usual handling.
- Trimming can hide what a task needs. With text previews (default from tracetrim 1.5) a stress test built around the removed fields kept 99.5% of their facts, against 100% with complete outputs; keep critical fields visible with --keep-field TOOL FIELD.
- Savings depend on the agent and the model: measure on your own runs with tracetrim measure before relying on them.
Residual effects
Unknown / self-reportedContributor-supplied residual-effect text is not independently verified. Undoing the host change does not delete what tracetrim wrote: its work directory and Guard's saved choices remain until you remove them.
- The work directory under ~/.tracetrim: servers.json (your servers' definitions, with the variable references they had), the traces of the runs (tool results and final answers), the learned configuration and report.html. init --undo leaves it as it is: delete it yourself when you no longer need it.
- In Guard, the choices saved on "Claude Code · observed tools" stay until you change them.
Release evidence
Unknown / self-reportedAccepted contributors recorded in the reviewed catalog: @alepom (author).
Controlled fixture proof (separate)
Unknown / self-reportedContributor assertion is not an authoritative fixture receipt. Isolated home, loopback-only network namespace, HOL Guard 3.61.0, Claude Code 2.1.329, tracetrim 1.4.0, a local fixture server that logs every tools/call. Choices saved on "Claude Code · observed tools" appeared in the acknowledged policy as claude-code:mcp__tracetrim__<tool>. Through tracetrim: delete_records with Block gave deny / block (native_custom_mcp_tool_block) and 0 upstream calls; lookup with Allow gave 1 upstream call. Direct, without tracetrim: lookup with Allow gave 1 call.
Exact installation and activation guide
Commands are copied only when the reviewed source supplies an exact argv contract. Other guidance is labeled unknown and is not executed by this page.
Install
Unknown / self-reportedContributor-supplied install guidance is not independently verified because an exact reviewed argv contract is unavailable. Install tracetrim from PyPI, then let tracetrim init show what it would change before writing anything.
- 1
Install it: pip install "tracetrim[measure,proxy]" (Python 3.10+).
Self-reported / unavailable - 2
In the project folder, run tracetrim init --host claude-code. This is a dry run: it lists the servers that would go behind tracetrim, those that stay in the host and why, and writes nothing.
Self-reported / unavailable - 3
Run tracetrim init --host claude-code --write. It backs up .mcp.json next to it, moves the servers to servers.json in a work directory under ~/.tracetrim readable only by you, leaves one tracetrim entry in .mcp.json, and starts it once to check that it answers. It never prints a key.
Self-reported / unavailable - 4
Restart Claude Code. Keep the backup and the rewritten .mcp.json out of what you commit: the entry holds paths of your machine.
Self-reported / unavailable
Activation
Unknown / self-reportedContributor-supplied activation guidance is not independently verified because an exact reviewed argv contract is unavailable. tracetrim needs no activation of its own: during the first 5 runs it only observes (JSON is written compactly, nothing is removed), then it trims on its own. Guard's per-tool choices for the tools reached through tracetrim are set on the entry "Claude Code · observed tools", which Guard builds after Claude Code has attempted each tool once.
- 1
In Claude Code, ask for a task that uses each tool you want to control once. Guard holds these first calls for review and records them.
Self-reported / unavailable - 2
In Guard, open Extensions → Add custom extension, refresh the list and select "Claude Code · observed tools" (not the configured tracetrim entry).
Self-reported / unavailable - 3
Set the choices, for example Allow on a read tool and Block on a tool that deletes; leave expand and tracetrim_done on Allow or inherit. Choose Save tool permissions and wait until the revision is acknowledged.
Self-reported / unavailable
Safe fixture inputs
Unknown / self-reportedContributor-supplied safe fixture input guidance is not independently verified because an exact reviewed argv contract is unavailable. Prove that Guard still controls tools reached through tracetrim without touching anything that writes: block a harmless read-only tool and check that the call is stopped, then allow it again.
- 1
Pick a read-only tool behind tracetrim, such as a search or a lookup, and ask Claude Code to use it once so that Guard records it.
Self-reported / unavailable - 2
On "Claude Code · observed tools", set that tool to Block, save and wait for the acknowledgement. Ask Claude Code to use it again: Guard denies the call and the upstream server receives nothing.
Self-reported / unavailable - 3
Set the tool to Allow, save, and ask again: the call goes through tracetrim and the result reaches the agent.
Self-reported / unavailable
Disable / remove
Unknown / self-reportedContributor-supplied disable/remove guidance is not independently verified because an exact reviewed argv contract is unavailable. tracetrim init --undo restores Claude Code's .mcp.json byte for byte from the backup init made, so the servers are reached directly again and Guard sees them as before. The work directory under ~/.tracetrim is left in place (see What remains). Guard's choices on "Claude Code · observed tools" stay until you change them.
- 1
To keep specific fields always visible without stopping tracetrim, add --keep-field TOOL FIELD to the tracetrim entry's arguments. To stop tracetrim altogether, undo the host change as below.
Self-reported / unavailable - 2
Run tracetrim init --undo BACKUP, where BACKUP is the .mcp.json.tracetrim-backup-DATE-TIME file next to .mcp.json. It restores the host's file byte for byte, and refuses (unless --force) if the file changed since init wrote it. Restart Claude Code.
Self-reported / unavailable - 3
Optionally, pip uninstall tracetrim.
Self-reported / unavailable
FAQ
Frequently asked questions
tracetrim learns from traces which tool output fields an agent visibly reuses and trims the rest. The expand tool returns a retained original result. The tracetrim_done tool closes a run with the agent's final answer. When tracetrim fronts other MCP servers, Guard sees one server. Proxied tools keep Guard's normal handling. The listing declares 0 rules and 1 permission check, with per-tool mapping for 3 tools. No per-command matchers are published for this listing.. Coverage is limited to these reviewed operations and the surrounding Guard policy.
External · opt-in: External coverage. It must be enabled through Guard controls; this page does not activate it. Enabling state is always controlled through Guard policy, never from this directory.
This listing entered the catalog as a community contribution through a public pull request with recorded provenance, with public credit to @alepom, and 1 GitHub maintainer is recorded on the listing. Credit is attribution only. A verified publisher profile and the claim flow verify authority separately; neither is an upstream endorsement or a HOL safety certification.
No. Every listing documents source, activation model, maintainer identity, and stated limitations so you can evaluate coverage before enabling it. Review the stated limitations and the exact source tree before relying on any single control.
This listing does not publish per-command matchers. Exact behavior follows your Guard policy combined with this entry's 0 rules and 1 permission check.
External coverage. It must be enabled through Guard controls; this page does not activate it. Enablement is managed through your workspace's Guard policy and controls — never from this directory. Open the install guidance for the setup flow, then adjust the MCP coverage for mcp.tracetrim in Guard's policy surface.
The matching action is stopped at Guard's pre-action boundary before it executes, and the decision is recorded with evidence your workspace can review. Exact behavior follows your Guard policy combined with this entry's 0 rules and 1 permission check.
No. Guard is local-first: interception, decisions, and evidence stay on your machine unless your workspace explicitly configures cloud features. This page is documentation only — it never executes a command or changes protection state.
Guard runs locally alongside the major AI coding agents and MCP-capable harnesses, so this coverage applies wherever Guard intercepts actions. See the supported harness guides at https://hol.org/guard/harnesses for per-tool approval behavior and limitations.
Guard has a free local tier that includes command interception, evidence, and the policy controls this listing documents. Team plans add shared policy, review queues, and audit surfaces. Current plans: https://hol.org/guard/pricing
Open an issue or pull request against the hol-guard repository, where the canonical catalog lives: https://github.com/hashgraph-online/hol-guard Listings are corrected through the same public review process that adds them.
Yes. Community extensions are merged through public pull requests with recorded provenance, and you can claim the publisher page for a contribution you maintain through the Publisher Studio.
The command mapping table is the audit trail for covered commands and catalog default floors. Pair it with the reviewed rule and permission counts, the per-tool state mapping, and the exact source tree linked from View exact source at the reviewed commit. Guard records enforcement decisions with evidence locally, so what ships matches what you reviewed.