Skip to main content
Glama
RajeevSirohi

mcp-server-terraform

tf_resource

Destructive

Manage Terraform resource state: import existing cloud resources, taint, untaint, or refresh state to sync with real infrastructure.

Instructions

Resource-level state operations:

  • import: Bring an existing cloud resource under Terraform management (requires address + id)

  • taint: Mark a resource for recreation on next apply (requires address)

  • untaint: Remove the taint mark (requires address)

  • refresh: Sync state with real infrastructure (accepts drift into state)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoCloud provider resource ID for import, e.g. i-0abcd1234 or an Azure resource ID
addressNoResource address, e.g. aws_instance.web (required for import/taint/untaint)
workdirYesAbsolute or relative path to the directory containing .tf files
operationYesResource operation to perform
workspaceNoTerraform workspace to use (default: current workspace)
Behavior4/5

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

The description adds behavioral context beyond the annotations (destructiveHint: true) by explaining each operation's effect, such as 'Mark a resource for recreation' for taint. Although it does not detail side effects or permissions, the use case for each operation is clear. The description does not contradict the annotations.

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 extremely concise, using bullet points to list operations. It is front-loaded with the overall purpose. Every sentence provides essential information without redundancy. This structure is ideal for quick comprehension by an AI agent.

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 the tool has no output schema, the description adequately explains the four operations and their parameter requirements. It covers the core behavior, though it does not mention error conditions, return formats, or the workspace parameter's role. For a multi-operation tool, this is reasonably complete but could be more thorough by adding outcome descriptions.

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?

Schema coverage is 100%, so baseline is 3. The description adds value by clarifying which parameters are required per operation (e.g., 'import: requires address + id'). This provides contextual meaning beyond the schema's property descriptions, particularly for the 'operation' enum and conditional requirements.

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 'Resource-level state operations' and lists four specific operations (import, taint, untaint, refresh) with brief explanations. It uses specific verbs and resources, making the tool's purpose unambiguous. Though it doesn't explicitly differentiate from siblings like tf_state, the focused scope on individual resource operations provides sufficient distinction.

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

Usage Guidelines3/5

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

The description implies usage by listing operations and requirements (e.g., 'requires address + id'), but it does not explicitly state when to use this tool versus alternatives (e.g., tf_state, tf_apply). No when-not or exclusion criteria are provided. This leaves the agent without clear guidance on selecting the correct tool among siblings.

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/RajeevSirohi/mcp-server-terraform'

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