Skip to main content
Glama

collapse_context

Prunes _session retention and wraps oversized ## Archived blocks to compact session logs without treating ordinary Markdown as a session log.

Instructions

Prune _session retention and wrap fat ## Archived blocks. Ordinary markdown is not treated as a session log.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "collapse_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNo_session
session_idNosession_id returned by start_session. If missing/expired, call start_session and follow next_action before retrying.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.3

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. "Prune" implies data loss, but the description never states what content is discarded, whether the operation is reversible, or whether it requires an active session. The one real disclosure — that non-session markdown is exempt — is useful but thin for a mutating tool.

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

Conciseness4/5

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

Two compact sentences with no filler. The exclusion clause is front-loaded appropriately, though the jargon ("retention", "fat blocks") makes it dense rather than efficient at the cost of a little clarity.

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

Completeness2/5

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

A compaction/mutation tool with no annotations, no output schema, and no explanation of what remains after collapse or how large a change the agent should expect. Given that siblings like start_session exist specifically to establish the `session_id` prerequisite, the description should connect those dots instead of leaving it all to a single schema field.

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

Parameters2/5

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

At 50% schema coverage, `scope` has no description at all; the description's passing mention of `_session` only hints at the default value already in the schema. `session_id` is fully documented in the schema itself, so the description contributes almost nothing beyond it — notably it doesn't say what values `scope` accepts or how it limits the pruning.

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

Purpose3/5

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

The verbs "prune" and "wrap" are specific and the objects (`_session` retention, ## Archived blocks) are named, so the general intent — compacting session logs — is inferable. However, the description never says what "wrap" produces (collapsible/toggle blocks?) or what "prune retention" actually removes, and it never references the tool's own name. Purpose is gestured at rather than stated.

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

Usage Guidelines2/5

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

The only guidance is the negative case: "Ordinary markdown is not treated as a session log," which implies a precondition but doesn't tell the agent when to call this versus get_context, update_context, or finish_session. No trigger, no frequency guidance, no named alternative.

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