Skip to main content
Glama

Generate Terraform for a resource

generate_terraform
Read-onlyIdempotent

Create a Terraform HCL resource block for one OCI resource from its type and OCID. Fetches the resource's attributes and maps them to the matching oci_* resource.

Instructions

Generate a Terraform (HCL) resource block for a single OCI resource by type and OCID. Fetches the resource's attributes and maps them to the matching oci_* resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ocidYesThe resource OCID
resourceTypeYesOCI resource type, e.g. Vcn, Subnet, Instance
compartmentIdNoCompartment OCID (for scoping)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is clear. The description adds that the tool fetches attributes and maps them to the matching oci_* resource, which is useful process context. However, it does not disclose any rate limits, authentication requirements, or error conditions; a 3 reflects that annotations cover most behavioral aspects and the description adds only moderate value.

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 a single, information-dense sentence with no redundancy or filler. It is front-loaded with the action and outcome, making it easy to parse quickly.

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, idempotent generation tool with a fully documented schema and no output schema, the description provides enough context to call it correctly. It lacks guidance on when to prefer it over generate_compartment_terraform, which is a minor but noticeable gap given the sibling tool's similar name.

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 all three parameters. The description reiterates that it uses 'type and OCID', which adds no new syntax or format details beyond the schema. The baseline of 3 is appropriate when the schema fully covers parameter semantics.

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 states a specific verb (Generate) and a specific resource (a Terraform HCL resource block for a single OCI resource) and names the inputs (type and OCID). It is clearly distinguishable from the sibling generate_compartment_terraform, which implies a broader scope, and from get_resource, which does not produce Terraform.

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 implicitly conveys that the tool is for a single resource, but does not explicitly state when to use it versus alternatives like generate_compartment_terraform or get_resource. No exclusions or prerequisites are provided, leaving the agent to infer the scope from context.

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