Skip to main content
Glama

drain_journal

Clears the auto-journaling staging buffer and returns deduplicated file paths touched during the run, along with raw breadcrumb count. Atomically claims and removes the staging file.

Instructions

Drain the auto-journaling staging buffer (.squad/pending-journal.jsonl) and return the de-duplicated set of file paths touched during the run, plus the raw breadcrumb count. No-op (returns empty) when .squad.yaml journaling is not opt-in. Side-effecting — atomically claims and clears the staging file. The squad skill calls this once in Phase 10 before the terminal record_run, folding touched_paths into the RunRecord.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_rootYes
Behavior5/5

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

Fully discloses side effects (atomically claims and clears the staging file), no-op behavior, and return values (deduplicated file paths and breadcrumb count). Since no annotations exist, the description compensates completely.

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?

Four sentences, front-loaded with main action. The last sentence about the squad skill context adds helpful usage detail without being overly verbose.

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?

Explains return values and side effects adequately. With no output schema, it covers essentials. Could be more precise about data types (e.g., list vs. set), but sufficient for most agents.

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?

The only parameter `workspace_root` lacks schema description (0% coverage) and the tool description does not explain its purpose or expected format beyond the parameter name. This leaves ambiguity.

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 action ('drain') and specific resource (`.squad/pending-journal.jsonl`), and distinguishes it from sibling tools like `record_run` by noting its role in Phase 10 before `record_run`.

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?

It provides explicit usage context: called once in Phase 10 before `record_run`, and mentions the no-op condition when journaling is not `opt-in`. However, it does not explicitly state when not to use or offer alternatives.

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/ggemba/squad-mcp'

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