Skip to main content
Glama

prune_flatten_artifacts

Delete leftover flatten artifacts (.bak, .preunflatten.bak, stale .tmp files) to reclaim disk space. Optionally remove .flat.jsonl sidecars when retrieval no longer needed.

Instructions

Reclaim disk by deleting leftover flatten artifacts (.bak, .preunflatten.bak, and stale .tmp- files) for a project. By default keeps .flat.jsonl sidecars (retrieve_flattened needs them) and runs dry. Set include_sidecars=true only when you no longer need to retrieve/unflatten those sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirNoAbsolute path to project. Default: the project the CLI runs in (cwd)
older_than_daysNoOnly delete artifacts whose mtime is older than N days. 0 = no age limit.
include_sidecarsNoAlso delete .flat.jsonl sidecars. WARNING: retrieve_flattened/unflatten_session stop working for those sessions.
dry_runNoReport what would be deleted without deleting. Default true for safety.
Behavior5/5

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

Without annotations, the description fully carries the burden. It discloses that files are deleted, highlights dry-run default for safety, and explains consequences of include_sidecars=true (breaks retrieve_flattened/unflatten_session). Also mentions age filtering.

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?

Two well-structured sentences with no wasted words. Front-loaded with the action and key details.

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?

The tool's behavior is fully described given its simplicity. No output schema is needed, as the tool reports deletions. All relevant parameters are explained with context.

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

Parameters5/5

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

Schema has 100% coverage, but description adds extra meaning: explains why sidecars are kept by default (needed by retrieve_flattened), and that dry_run defaults to true for safety. This augments the schema descriptions.

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 it reclaims disk by deleting specific artifact types (.bak, .preunflatten.bak, stale .tmp-<pid> files) for a project. It distinguishes itself from sibling tools like flatten_session or unflatten_session by focusing on cleanup, not session management.

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?

Provides strong context: when to use (reclaim disk), warns against deleting sidecars if retrieve_flattened is needed, and advises setting include_sidecars=true only when sessions are no longer needed. Does not explicitly mention alternative tools, but the usage is clear.

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/shayaShav/flatten-mcp'

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