Skip to main content
Glama

execute_cleanup

Executes approved cleanup actions from analysis, moving files with git history preservation and creating missing directories. Accepts specific action IDs or 'all' to perform all moves.

Instructions

Execute approved cleanup actions from analyze_knowledge_repo().

    Side effects: moves files within the knowledge repo using git mv
    (preserves git history) and creates missing category directories.
    NEVER deletes any file. Requires analyze_knowledge_repo() to have
    been called first in this session.

    Use "all" to execute every proposed action, or pass a comma-separated
    list of specific action IDs (e.g. "a1,a3") to cherry-pick.
    Call reindex() after cleanup to rebuild the search index.

    Args:
        actions: Comma-separated action IDs from the analysis report,
                 e.g. "a1,a2,a5", or "all" to execute everything
        project: Target project name (optional)

    Returns:
        Per-action results (directories created, files moved), any errors,
        and a rollback command to undo the moves if needed.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionsYes
projectNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses side effects: moves files via git mv (preserving history), creates directories, and explicitly states it never deletes. No annotations exist, so description carries full burden; it covers key behavioral traits well, though could mention idempotency or permission requirements.

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?

Description is mostly concise, front-loading the main purpose. The 'Args:' and 'Returns:' sections add structure but are slightly verbose. Still efficient for the complexity.

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?

Covers all essential aspects: purpose, prerequisites, parameter usage, side effects, return value (per-action results, rollback command). Complete guidance for invoking the tool correctly, given the presence of an output schema.

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?

With 0% schema description coverage, description adds meaning: explains actions parameter accepts comma-separated IDs or 'all' with example, and describes project as optional target name. This compensates for lack of 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?

Description uses a specific verb ('Execute') and resource ('cleanup actions from analyze_knowledge_repo()'), clearly distinguishing it from sibling tools like analyze_knowledge_repo and reindex.

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?

Explicitly states prerequisite (analyze_knowledge_repo() must be called first), provides guidance on using 'all' vs specific IDs, and recommends calling reindex() afterward, giving clear when-to-use and follow-up instructions.

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/dl4rce/flaiwheel'

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