Skip to main content
Glama

tf_check_arguments

Idempotent

Validate Terraform argument and nested-block paths against the pinned provider schema before writing, flagging unknown, read-only, and deprecated paths.

Instructions

Validate argument / nested-block paths against the PINNED schema before writing them, e.g. ["bucket", "region", "versioning.enabled"]. Flags unknown, read-only and deprecated paths. Executes code: unless the schema is cached, this runs terraform providers schema, which starts the provider plugins installed under dir/.terraform/providers (with credential environment variables removed; they still run as your user).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "type_name": "<type_name>",
      "arguments": "<arguments>"
    },
    "name": "tf_check_arguments"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirNoTerraform root module directory (must already be initialized), inside the server's directory or TERRAFORM_CWD_MCP_ALLOWED_DIRS. Default: TERRAFORM_CWD_MCP_DIR, else the server's working directory.
kindNoresource | data | ephemeralresource
argumentsYesDotted paths; nested blocks are separated by '.'
type_nameYesFull type name, e.g. aws_s3_bucket

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • changedInput schema / properties / dir / description
      Previous value: -"Terraform root module directory (must already be initialized). Default: TERRAFORM_CWD_MCP_DIR, else the server's working directory."New value: +"Terraform root module directory (must already be initialized), inside the server's directory or TERRAFORM_CWD_MCP_ALLOWED_DIRS. Default: TERRAFORM_CWD_MCP_DIR, else the server's working directory."
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations cover only the generic safety profile, yet the description discloses a real side effect: unless the schema is cached, it shells out to `terraform providers schema` and starts provider plugins from dir/.terraform/providers. It further notes credential environment variables are stripped while the plugins still run as the calling user — exactly the kind of behavioral and security context annotations cannot convey.

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?

Purpose and example come first, side-effect disclosure second — good front-loading with no filler. The execution sentence is dense and slightly parenthetical, but every clause carries decision-relevant information.

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?

Covers purpose, path format, side effects, and the caching conditional, which is enough for a 4-parameter tool with annotations and no output schema. The main gap is the outcome shape: it says it "flags" unknown/read-only/deprecated paths but never states whether that surfaces as an error or a list of findings.

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?

With schema coverage at 100%, the baseline is 3, but the description adds real value by giving a concrete nested-block example (["bucket", "region", "versioning.enabled"]) that shows how dotted paths compose, plus clarifying that validation targets the pinned schema. It still says nothing about how dir or kind interact with the validation.

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?

The description states a precise verb and resource: validate argument and nested-block paths against the PINNED schema, with a concrete example input. It implicitly separates itself from schema-lookup siblings by emphasizing pre-write validation, but never names an alternative tool, so it stops short of a 5.

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?

"before writing them" gives a clear trigger point in the workflow, telling the agent to call this prior to any resource write. It offers no explicit exclusions or named alternatives, so there is no when-not-to-use guidance.

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