Skip to main content
Glama

local_dev_cleanup

Remove temporary files and reset configurations in local development environments to maintain system performance and prepare for new projects.

Instructions

Clean up a local development environment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
env_idYesEnvironment identifier

Implementation Reference

  • Registers the local_dev_cleanup tool with MCP framework, defining name, description, and input schema requiring 'env_id'.
        types.Tool(
            name="local_dev_cleanup",
            description="Clean up a local development environment",
            inputSchema={
                "type": "object",
                "properties": {
                    "env_id": {"type": "string", "description": "Environment identifier"}
                },
                "required": ["env_id"],
            },
        ),
    ]
  • Implements the tool handler: retrieves environment by ID, calls cleanup_environment if found, returns JSON success/error response.
    elif name == "local_dev_cleanup":
        env = get_environment(arguments["env_id"])
        if not env:
            return [
                types.TextContent(
                    type="text",
                    text=json.dumps(
                        {
                            "success": False,
                            "error": f"Unknown environment: {arguments['env_id']}",
                        }
                    ),
                )
            ]
        cleanup_environment(env)
        return [
            types.TextContent(
                type="text",
                text=json.dumps(
                    {
                        "success": True,
                        "data": {
                            "message": "Environment cleaned up successfully"
                        },
                    }
                ),
            )
        ]
  • Core cleanup logic: removes environment from in-memory store and invokes sandbox cleanup.
    def cleanup_environment(env: Environment) -> None:
        """Clean up environment and its resources."""
        if env.id in _ENVIRONMENTS:
            del _ENVIRONMENTS[env.id]
        cleanup_sandbox(env.sandbox)
  • Retrieves environment from in-memory store by ID, used in handler.
    def get_environment(env_id: str) -> Optional[Environment]:
        """Get environment by ID."""
        return _ENVIRONMENTS.get(env_id)
Behavior2/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 of behavioral disclosure. It states the tool performs cleanup but does not specify what actions are taken (e.g., destructive deletion, archiving, or resetting), potential side effects, permission requirements, or error handling. This leaves significant gaps in understanding the tool's behavior and risks.

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, concise sentence: 'Clean up a local development environment.' It is front-loaded with the core action and resource, with no unnecessary words or redundancy. Every part of the sentence contributes directly to the tool's purpose.

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

Completeness2/5

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

Given the tool's complexity (a cleanup operation likely involving destructive actions), lack of annotations, and no output schema, the description is insufficient. It does not explain what 'clean up' entails, what is returned (e.g., success status, logs), or any constraints. For a tool that could have significant side effects, more detail is needed to ensure safe and correct usage.

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 input schema has 100% coverage with one parameter ('env_id'), documented as 'Environment identifier.' The description does not add any parameter-specific details beyond the schema, but since there is only one parameter and schema coverage is high, the baseline is elevated. The description implies the parameter identifies the environment to clean up, which aligns with the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as 'Clean up a local development environment,' which is clear but vague. It specifies the verb ('clean up') and resource ('local development environment'), but lacks detail on what 'clean up' entails (e.g., deleting files, stopping processes, resetting configurations). It does not differentiate from sibling tools like 'local_dev_from_filesystem' or 'local_dev_run_tests,' which are unrelated operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, such as when cleanup is needed (e.g., after testing or before deployment), or exclusions, like avoiding use during active development. Without context, the agent must infer usage based on the tool name alone.

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/txbm/mcp-local-dev'

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