Skip to main content
Glama

scan_terraform_file

Scan Terraform files for security misconfigurations using Checkov, returning structured findings with check ID, affected resource, line range, and code snippet.

Instructions

Scan Terraform (.tf) file content for security misconfigurations using Checkov and return structured findings.

Each finding includes the Checkov check ID, a human-readable title, the affected resource, its line range in the file, and the offending code snippet. Use this whenever the user asks to review, audit, or check the security of Terraform code.

Args: file_content: the raw text of a .tf file filename: original filename, used only for a friendlier label in output

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameNomain.tf
file_contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure, and it does well by outlining what the tool returns (Checkov check ID, title, resource, line range, code snippet). It does not mention limitations such as invalid Terraform or external dependencies, but it clearly communicates the main behavior and output shape.

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?

The description is compact and well-structured: a one-sentence definition, a use indicator, and an argument list that adds value beyond the schema. There is no redundant or filler content.

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?

Given the small parameter count, output schema availability, and sibling context, the description covers the essential inputs and expected outputs. It could be slightly more explicit about behavior on invalid/nonexistent Terraform content, but for the average call it is complete enough.

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

Parameters5/5

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

Input schema coverage is 0%, but the description fully compensates by documenting both arguments: file_content as the raw .tf text and filename as only a friendlier output label. This gives an agent everything needed to construct correct parameters.

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?

The description uses a specific verb ('scan') and resource type (Terraform .tf files) and states the goal ('security misconfigurations') and engine (Checkov). It is easily distinguished from sibling scan_dockerfile_file by mentioning Terraform explicitly.

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?

The description explicitly says to use it whenever the user asks to review, audit, or check Terraform code. It does not explicitly mention excluding other file types or name the Dockerfile sibling as an alternative, so it slightly misses the top guidance bar.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SanjanaJanardhan/infra-guard'

If you have feedback or need assistance with the MCP directory API, please join our Discord server