Skip to main content
Glama

tf_state_addresses

Read-onlyIdempotent

Lists resource instance addresses in the current Terraform state, optionally filtered, read-only, without locking or refreshing; refuses non-existent non-default workspaces to avoid creation.

Instructions

List resource instance addresses in the current Terraform state (terraform state list), optionally filtered. Read-only: never locks, never refreshes. With a remote backend this reads S3/GCS/HCP using the server's credentials; a non-default workspace that does not exist is refused (reading it would create it).

Input Schema

NameRequiredDescriptionDefault
idNoOnly the instance whose id attribute equals this (terraform state list -id)
dirNoTerraform root module directory (must already be initialized). Default: TERRAFORM_CWD_MCP_DIR, else the server's working directory.
limitNoMax addresses to return (default 200)
filterNoCase-sensitive substring of the address, e.g. 'module.network' or 'aws_instance.'

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, idempotency and non-destructiveness, yet the description still adds real value: it says it never locks or refreshes, reads S3/GCS/HCP with the server's credentials, and refuses a non-default workspace that does not exist to avoid creating it. These are non-obvious behavioral traits beyond the annotation set; the one gap is no note on pagination/truncation relative to the limit parameter.

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 tight sentences with the core purpose front-loaded and no filler; the remote-backend and workspace caveats follow in decreasing order of importance. Every sentence earns its place.

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, but the tool returns a simple address list, and the description plus annotations cover safety, backend access and the workspace-refusal edge case. A brief note on return shape or large-state truncation would complete it, but nothing essential for correct invocation is missing.

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 the schema already documents all four parameters, including the filter substring syntax and id. The description only mirrors this ('optionally filtered') without adding format or edge-case detail, so the baseline of 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 ('List resource instance addresses in the current Terraform state') and equates it to the known 'terraform state list' command. This is clearly distinguishable from every sibling (providers, types, schema, check_arguments, summarize_plan, module_interface, show_resource, upgrade_impact), which all address different resources.

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 conveys context ('optionally filtered', remote-backend behavior) but never states when to choose this tool over an alternative such as tf_show_resource for inspecting state. There is no explicit when/when-not guidance, so usage is only implied.

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