Skip to main content
Glama

record_compaction_audit

Record context-compaction events to audit token counts and re-injected facts across compaction boundaries.

Instructions

Record a context-compaction event with token counts and what was re-injected. Lets developers audit what was remembered across compaction boundaries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNo
pre_compact_tokensNo
post_compact_tokensNo
facts_injectedNo
constraints_injectedNo
injection_eventNo
raw_summaryNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the transparency burden. It clearly indicates a write operation ('Record') and specifies the logged data (token counts and re-injected items). It lacks details on side effects, permissions, or idempotency, but for a straightforward logging tool the core behavior is well communicated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loading the action and resource. Every word adds value; no superfluous content. It is efficiently structured for quick parsing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 7 parameters and no output schema or annotations, the description is minimal. It explains the purpose but does not cover parameter details, expected return values, error conditions, or whether the tool is idempotent. More information could be provided for a more complete picture.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'token counts' (mapped to pre/post_compact_tokens) and 'what was re-injected' (mapped to facts_injected, constraints_injected, injection_event, raw_summary), but does not explicitly define each parameter or their formats. The parameter names are self-explanatory, but the description could provide more explicit mapping.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool records a 'context-compaction event' with token counts and re-injected content, using the specific verb 'Record'. It distinguishes itself from sibling tools like 'get_compaction_audit' (which reads audits) and 'recall_transcript_range' (which retrieves context).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The second sentence explicitly states the tool helps developers 'audit what was remembered across compaction boundaries', providing clear context for use. It does not explicitly list when not to use it or suggest alternative tools, but the context is sufficient for an agent to decide when this audit logging is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SaravananJaichandar/world-model-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server