Skip to main content
Glama

Destroy Infrastructure

tfdestroy
Destructive

Tear down deployed infrastructure by providing the session ID from a prior successful deployment. Use after deployment to remove all resources.

Instructions

DESTROY: Tear down previously deployed infrastructure Destroys infrastructure by calling the Oracle destroy endpoint for a session that has a prior successful deployment. IMPORTANT: This starts a long-running job. Use tfstatus/tflogs to monitor progress. SINGLE-FLIGHT: only one TF job per session at a time. If another job is already in flight, tfdestroy returns tf_job_conflict with the live job_id — attach with tfstatus/tflogs, or pass force_new=true to override. REQUIRES: session_id from convoopen response (format: sess_v2_...). OPTIONAL: force_new (boolean, default false) - bypass the single-flight guard. Use only when the existing run is provably wedged. PREREQUISITE: The session must have a prior successful deployment with a project_id. After destroy completes, the session is kept for historical record but hasDeployment is set to false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
force_newNoWhen true, bypass the single-flight guard and force a new destroy even if another job is in flight.
session_idYesSession ID from convoopen — pass back EXACTLY as returned, including the ?token=... suffix (format: sess_v2_*?token=*). The suffix is part of the session credential; never strip it when summarizing. The deployed stack for this session will be torn down.
Behavior5/5

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

Adds significant behavioral context beyond destructiveHint annotation: describes long-running job, single-flight behavior, error type (tf_job_conflict), and post-completion state change (hasDeployment set to false). No contradiction with annotations.

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?

Well-structured with clear sections, front-loaded key points. Slightly verbose in explaining single-flight and force_new, but each sentence adds value. Could be slightly tighter, but highly effective.

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

Completeness4/5

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

Given no output schema, the description adequately covers behavior, prerequisites, and post-destroy state. Mentions monitoring tools. Missing return details but compensated by job monitoring references.

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?

Adds critical meaning beyond schema: explains session_id format importance (including token), and force_new usage scenario (wedged runs). With 100% schema coverage, the description enriches parameter understanding.

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?

Clearly states the tool destroys infrastructure with the verb 'Destroy' and 'Tear down', specifying the resource as 'previously deployed infrastructure'. Differentiates from sibling tools like tfdeploy (deploy) and tfplan (plan).

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?

Explicit usage conditions: requires a prior successful deployment, a session_id from convoopen, and notes single-flight constraint. Provides guidance on handling conflicts (force_new, attaching to existing job) and monitoring with tfstatus/tflogs.

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/luthersystems/insideout-agent-skills'

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