Skip to main content
Glama

tf_show_resource

Read-onlyIdempotent

Show one Terraform resource instance's current state attributes by exact address, with sensitive values redacted; read-only, no locks or refreshes.

Instructions

Show one resource instance's attribute values from the current Terraform state (terraform show -json). Read-only: never locks, never refreshes. Sensitive values are redacted: Terraform's own markers, plus values equal to a marked one, secret-like names and secret-shaped strings; a footer says what was hidden and why.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNoTerraform root module directory (must already be initialized). Default: TERRAFORM_CWD_MCP_DIR, else the server's working directory.
addressYesExact resource instance address from tf_state_addresses, e.g. aws_instance.web[0] or module.db.aws_db_instance.this["primary"]
include_nullNoAlso list attributes whose value is null
max_value_charsNoTruncate each value; 0 = no limit (default 200)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description still adds real value by specifying 'never locks, never refreshes' and detailing the redaction policy (Terraform markers, equal values, secret-like names/shapes) plus a footer explaining what was hidden. That is genuine behavioral context beyond 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?

Three tightly packed sentences: identity and source first, then safety, then redaction behavior. Every sentence carries information an agent needs, with no filler.

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?

There is no output schema, so the description helps by explaining the read-only nature and the redaction footer that accompanies results. It could say a bit more about result shape (e.g., flattened attribute list, truncation), but it is largely complete for a single-resource read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all four parameters (dir, address, include_null, max_value_chars) are documented in the schema with defaults and constraints. The description adds no parameter-level syntax or format information beyond this, so the baseline 3 applies.

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?

States a specific verb and resource ('Show one resource instance's attribute values') plus the exact source ('from the current Terraform state (terraform show -json)'). This clearly distinguishes it from siblings like tf_state_addresses, which would list addresses rather than dump an instance's attributes.

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?

Usage is implied rather than stated: the address parameter description points to tf_state_addresses as the source of a valid address, suggesting a follow-on workflow. However, the description itself never says when to use this over alternatives or any when-not conditions. Adequate but with a clear gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.