Skip to main content
Glama

heim_clear

Destructive

Clear the local Heim runtime cache to stop applications and remove all associated data, logs, and metrics for a clean deployment environment.

Instructions

Clears the local cache of the Heim runtime which will attempt to stop the runtime and remove all applications, logs, metrics, etc. from the runtime.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes the 'heim clear --force' command using child_process.exec (promisified), captures stdout/stderr, and returns it as text content or an error response.
    async () => {
      const execPromise = util.promisify(exec);
      try {
        const { stdout, stderr } = await execPromise("heim clear --force");
        return {
          content: [
            {
              type: "text",
              text: `stdout:\n${stdout}\nstderr:\n${stderr}`,
            },
          ],
        };
      } catch (err: any) {
        return {
          content: [{ type: "text", text: `Error: ${err.message}` }],
          isError: true,
        };
      }
    }
  • src/tools.ts:218-248 (registration)
    Registers the heim_clear tool on the MCP server inside registerTools function, with description, destructive annotations, and inline handler.
    // TOOL: heim_clear
    server.tool(
      "heim_clear",
      "Clears the local cache of the Heim runtime which will attempt to stop the runtime and remove all applications, logs, metrics, etc. from the runtime.",
      {
        title: "Clear Heim Runtime",
        destructiveHint: true,
        readOnlyHint: false,
        idempotentHint: false,
        openWorldHint: false,
      },
      async () => {
        const execPromise = util.promisify(exec);
        try {
          const { stdout, stderr } = await execPromise("heim clear --force");
          return {
            content: [
              {
                type: "text",
                text: `stdout:\n${stdout}\nstderr:\n${stderr}`,
              },
            ],
          };
        } catch (err: any) {
          return {
            content: [{ type: "text", text: `Error: ${err.message}` }],
            isError: true,
          };
        }
      }
    );
Behavior4/5

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

Annotations already provide key behavioral hints (destructiveHint: true, readOnlyHint: false, etc.), but the description adds valuable context beyond this: it specifies that clearing the cache 'will attempt to stop the runtime' and removes 'all applications, logs, metrics, etc.', clarifying the scope and impact of the destructive operation. No contradiction with annotations is present.

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?

The description is a single, well-structured sentence that efficiently conveys the tool's purpose and effects without redundancy. It is front-loaded with the core action ('Clears the local cache') and adds necessary details, though it could be slightly more concise by avoiding 'etc.'

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

Completeness3/5

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

Given the tool's complexity (destructive operation with no parameters) and rich annotations, the description covers the core action and scope adequately. However, without an output schema, it lacks details on return values or success/failure indicators, and it doesn't address potential side effects like downtime or recovery steps, leaving some gaps for the agent.

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 parameters and 100% schema description coverage, the baseline is 4. The description appropriately does not discuss parameters, as none exist, and focuses on the tool's action and effects, which is sufficient given the empty input schema.

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 specific action ('clears') and resource ('local cache of the Heim runtime'), with explicit details about what gets removed ('all applications, logs, metrics, etc.'). It distinguishes from siblings like deploy_heim_application or heim_start by focusing on cleanup rather than deployment or startup.

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 implies usage for clearing cache and stopping the runtime, but provides no explicit guidance on when to use this tool versus alternatives (e.g., heim_update for updates or heim_start for restarting). No prerequisites or exclusions are mentioned, leaving the agent with minimal context for decision-making.

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/Nor2-io/heim-mcp'

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