Skip to main content
Glama

Compact the worker's running context now

local_llm_compact
Idempotent

Compress the current conversation memory into a fresh summary to free up context. Call this manually only when automatic compaction did not run, recording the reason in the context log.

Instructions

Ask the worker to compress its running memory of this conversation into a fresh summary. Normally automatic (a PreCompact hook triggers it when your own context is compacted, and the server compacts on its own when its context grows large); call it only if you compacted manually and the hook is absent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoWhy (recorded in the context log).requested by caller

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already provide idempotentHint=true and destructiveHint=false; the description adds useful context about automatic triggers (PreCompact hook and server-side compaction) and clarifies the tool's role as a manual fallback. It is consistent with annotations and gives the agent the behavioral nuance it needs, though it could slightly expand on what 'compact' means for future context fidelity.

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 compact and front-loaded: the first sentence states the action, and the second sentence supplies necessary usage constraints. There is no filler or repetition of schema content.

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

Completeness5/5

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

Given the simple input schema, existing output schema, and clear annotations, the description covers the essential context: what the tool does, when it is normally triggered, and when manual invocation is required. Nothing critically missing for an agent to decide whether and how to call it.

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% for the single optional 'reason' parameter, so the schema already explains its meaning ('Why (recorded in the context log).'). The description does not need to add parameter-level detail, and the baseline of 3 is appropriate.

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 uses a specific verb ('compress') and resource ('the worker's running memory of this conversation'), making the tool's function unmistakable. It also distinguishes this tool from siblings by framing it as a manual fallback for automatic compaction, which is clear without needing to inspect other tool schemas.

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

Usage Guidelines5/5

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

It explicitly states when not to call the tool ('Normally automatic') and gives the precise condition for calling it ('only if you compacted manually and the hook is absent'). This is concrete, actionable guidance that prevents unnecessary invocations.

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