Skip to main content
Glama
zebbern

agloop-mcp

by zebbern

agloop_get_compaction_context

Retrieve compaction recovery context including compaction count, pending decisions, last delegation, and recovery hints after VS Code context compaction to restore agent state.

Instructions

Get compaction recovery context: compaction count, pending decision, last delegation, recovery hint. Critical after VS Code context compaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool `agloop_get_compaction_context` is defined as an MCP tool handler in `src/agloop_mcp/server.py`. It uses the `_sm()` helper to retrieve the compaction context from the `StateManager` and returns it as a JSON string.
    @mcp.tool()
    def agloop_get_compaction_context() -> str:
        """Get compaction recovery context: compaction count, pending decision, last delegation, recovery hint. Critical after VS Code context compaction."""
        ctx = _sm().get_compaction_context()
        if not ctx:
            return json.dumps({"error": "No compaction context"})
        return json.dumps(asdict(ctx), indent=2)
Behavior3/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. It implies a read-only operation ('Get') and adds context about its critical use after compaction, which is helpful. However, it lacks details on permissions, rate limits, or error behavior, leaving gaps in behavioral disclosure for a tool described as 'critical'.

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 a single, dense sentence with no wasted words. It front-loads the purpose and includes essential context efficiently, making it easy to parse and understand quickly.

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

Completeness4/5

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

Given the tool has 0 parameters, 100% schema coverage, and an output schema exists, the description is reasonably complete. It explains the purpose, usage context, and data fields retrieved. However, as a 'critical' tool with no annotations, it could benefit from more behavioral details like error handling or dependencies, slightly reducing completeness.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the inputs. The description doesn't need to add parameter semantics, but it implicitly confirms no inputs are required by not mentioning any. This meets the baseline for zero parameters, though it doesn't explicitly state 'no parameters needed'.

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 clearly states the verb 'Get' and the resource 'compaction recovery context', specifying it retrieves specific data fields (compaction count, pending decision, last delegation, recovery hint). It distinguishes from siblings by focusing on compaction recovery rather than logs, tasks, or agents, though it doesn't explicitly contrast with similar tools like 'agloop_get_state'.

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 description provides clear context for when to use this tool: 'Critical after VS Code context compaction.' This indicates it's specifically for post-compaction scenarios. However, it doesn't mention when not to use it or name alternatives among siblings, such as 'agloop_get_state' for general state retrieval.

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/zebbern/agloop-mcp'

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