Skip to main content
Glama

tf_get_schema

Read-onlyIdempotent

Retrieve exact arguments and nested blocks for one Terraform type at the pinned provider version before writing or editing resource, data, or ephemeral blocks.

Instructions

Exact arguments and nested blocks for one type at the PINNED provider version. Use BEFORE writing or editing any resource/data/ephemeral block; only arguments listed here exist. 'computed (read-only)' attributes cannot be set. kind: resource | data | ephemeral.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNoTerraform root module directory (must already be initialized). Default: TERRAFORM_CWD_MCP_DIR, else the server's working directory.
kindNoresource | data | ephemeralresource
max_depthNoNested block levels to expand (default 3)
type_nameYesFull type name, e.g. aws_s3_bucket
description_charsNoTruncate each description to this many characters; 0 = no limit (default 160)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, but the description adds real behavioral value: attributes are pinned to the provider version, computed (read-only) attributes cannot be set, and unlisted arguments do not exist. That materially shapes how an agent writes config after calling this.

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?

Three dense sentences, front-loaded with the core action and the pre-write instruction. Every sentence carries information, with only the trailing kind enumeration being a partial restatement of the schema default.

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?

For a read-only introspection tool with fully documented parameters, the description covers purpose, timing, and the key constraint about computed attributes and unlisted arguments. No output schema exists, yet the description gives no hint of the returned structure beyond 'arguments and nested blocks,' a minor gap.

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 description coverage is 100%, so the schema already documents dir, kind, max_depth, type_name and description_chars. The description only echoes the kind enum values, adding nothing new about the other four parameters. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: returns exact arguments and nested blocks for one type at the pinned provider version, which is clearly distinct from tf_search_types (discovery) and tf_check_arguments (validation). It does not explicitly name those siblings, so the differentiation is inferable rather than stated.

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?

'Use BEFORE writing or editing any resource/data/ephemeral block' gives an explicit timing and trigger condition. It also sets the hard constraint 'only arguments listed here exist.' It stops short of naming an alternative tool or a when-not-to-use condition.

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