heim_clear
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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:229-247 (handler)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, }; } } );