Skip to main content
Glama

Terraform backend info

tf_backend_info
Read-only

Reports the configured Terraform backend type and configuration for an initialized project by reading .terraform/terraform.tfstate; run terraform init first.

Instructions

Report the configured backend type and config for an initialized project. Reads .terraform/terraform.tfstate — run init first.

Input Schema

NameRequiredDescriptionDefault
cwdYesTerraform project directory

Output Schema

NameRequiredDescriptionDefault
typeYes
configYes
retainedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds real context beyond that: the data source is .terraform/terraform.tfstate and the project must be initialized first. It does not describe behavior when the file is missing or what error the agent should expect.

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?

Two short sentences, front-loaded with the purpose, with the prerequisite attached as a trailing clause. Nothing extraneous.

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

Completeness5/5

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

An output schema exists, so return values need no explanation. For a single-param read-only tool, the purpose, data source, and init prerequisite are all an agent needs to call it correctly.

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?

One required parameter with 100% schema coverage, so the schema already documents 'cwd' as the project directory. The description adds no syntax or path-format detail beyond that baseline.

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 — 'Report the configured backend type and config' — scoped to 'an initialized project'. An agent can distinguish this from tf_show (state contents) or tf_state_list (resources) without opening any schema.

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

Usage Guidelines4/5

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

Gives a clear precondition — 'run init first' — and restricts scope to initialized projects. It doesn't name a sibling alternative for the uninitialized case, so it stops short of full when/when-not guidance.

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