Skip to main content
Glama

memory_compile_context

Compile a token-budgeted, provenance-cited context bundle for a coding query, automatically suppressing stale or superseded facts.

Instructions

Compile a token-budgeted, provenance-cited context bundle for a coding query, automatically suppressing superseded/stale facts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "memory_compile_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_ofNoOptional ISO-8601 timestamp for point-in-time compilation.
queryYesTask description, symbol, or file query.
max_tokensNoStrict maximum token budget for the compiled context.
include_supersededNoWhether to include historically superseded facts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose meaningful traits: hard token budget, provenance citation, and automatic suppression of superseded/stale facts. It does not state that the operation is non-mutating/read-only, nor what happens when the token budget cannot be satisfied or how the bundle is ordered.

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?

A single dense sentence with the core action and its three defining properties front-loaded; every clause (budget, provenance, staleness suppression) carries distinct information and none is wasted.

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?

For a four-parameter tool with no annotations and no output schema, the definition covers purpose and key behavioral guarantees but not the return shape — what the bundle looks like, how citations are formatted, or failure modes when the budget is too small.

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 100%, so all four parameters are already documented, and the baseline is 3. The description adds only marginal semantic reinforcement, tying "token-budgeted" to max_tokens and staleness suppression to the include_superseded default.

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

Purpose4/5

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

The description names a specific verb (compile) and resource (token-budgeted, provenance-cited context bundle) qualified to a coding query, which is clearly distinct from data-mutating siblings like memory_upsert_fact or entity lookups like memory_query_entity. It stops short of explicitly contrasting itself with alternatives such as memory_time_travel or memory_verify_integrity.

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

Usage Guidelines3/5

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

"for a coding query" implies the situation to use it (assembling context before reasoning about code), but there is no explicit when-not guidance and no named alternative for cases like point-in-time retrieval or raw entity lookup. The agent must infer routing from sibling names alone.

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