Skip to main content
Glama

Generate Terraform for a whole compartment

generate_compartment_terraform
Read-onlyIdempotent

Discover all resources in an OCI compartment and generate a Terraform module with provider variables and one block per resource, including annotated skeletons for unrecognized types.

Instructions

Discover every resource in a compartment and emit a Terraform module (provider variables + one block per resource) to reproduce it. Unrecognised types become annotated skeletons.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compartmentIdYesCompartment OCID

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, non-destructive behavior. The description adds useful behavioral context by explaining that all resources are discovered, that the output is a structured Terraform module, and that unrecognized types become annotated skeletons rather than being omitted or causing errors.

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 two concise sentences with no filler. The primary action and scope are front-loaded, and the edge-case behavior for unrecognized types is included without unnecessary elaboration.

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?

For a tool with a single well-described parameter and no output schema, the description sufficiently explains what will be produced: a Terraform module with provider variables and per-resource blocks. It also covers the important open-world edge case of unrecognized types becoming annotated skeletons, so the agent knows what to expect.

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?

The only parameter, compartmentId, is already fully described in the schema as 'Compartment OCID' with 100% coverage. The description adds contextual framing around 'a whole compartment' but no additional parameter-level semantics beyond what the schema provides.

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 specific action verbs ('Discover', 'emit') and clearly identifies the resource scope ('every resource in a compartment'). It describes the output as a Terraform module with provider variables and one block per resource, making it easy to distinguish from the more generic sibling generate_terraform.

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 clearly implies when to use this tool: when you want to reproduce an entire compartment as Terraform. However, it does not explicitly mention alternatives or state when not to use it, leaving some inference required.

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

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/dockndevai/mcp-oci'

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