Skip to main content
Glama

get_backend_config

Retrieves the correct Terraform S3 backend configuration (bucket, key, region, locking) for a given team, project, and environment, prompting for bucket and region if not already defined.

Instructions

Obtiene la configuración del backend S3 de un proyecto Terraform.

Devuelve el bucket, la key, la region y la configuración de locking correctos según el team, el project y el environment. Normalmente se resuelve desde la variable de entorno BACKEND_CONFIG (string JSON).

Si BACKEND_CONFIG no está definida, esta tool devuelve needs_user_input: pregunta al usuario el bucket y la region y vuelve a llamarla pasando esos valores en bucket y region. Nunca generes el backend comentado ni con placeholders.

Args: team: Nombre del equipo (por ejemplo, 'platform', 'backend', 'data'). project: Nombre del proyecto (por ejemplo, 'onboarding', 'payments'). environment: Environment (por ejemplo, 'dev', 'staging', 'prod'). bucket: Bucket de state indicado por el usuario. Tiene prioridad sobre BACKEND_CONFIG. region: Region del bucket indicada por el usuario. Tiene prioridad sobre BACKEND_CONFIG.

Returns: Objeto JSON con la configuración completa del bloque backend "s3" y el archivo destino (backend.tf).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamYes
bucketNo
regionNo
projectYes
environmentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the burden and succeeds by disclosing the fallback behavior, the priority of bucket/region over the environment variable, and the rule to never generate commented-out or placeholder backends. It doesn't cover potential errors but provides essential behavior.

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?

The description is well-structured with a purpose sentence, a behavior paragraph, and an Args list. It is moderately detailed but each sentence adds value, and the formatting aids scanning. Slightly longer than necessary but not padded.

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 5 parameters, no annotations, and an interactive workflow, the description covers purpose, all parameters, the return value (JSON with backend block and destination file), and the fallback behavior. It is complete and leaves no major gaps.

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?

Schema description coverage is 0%, so the Args section is critical. It explains each parameter with examples (team: 'platform', project: 'onboarding') and explicitly states that bucket/region take priority over BACKEND_CONFIG, fully compensating for the schema's lack of descriptions.

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 opens with 'Obtiene la configuración del backend S3 de un proyecto Terraform', a specific verb and resource. It clearly differentiates from sibling tools like search_modules and scaffold_terraform by focusing on backend S3 configuration.

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 provides clear workflow guidance: if BACKEND_CONFIG is not defined, the tool returns `needs_user_input`, prompting the agent to ask the user for bucket/region and re-call with those values. It does not explicitly name alternatives, but the context is clear and actionable.

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/isma-aguilera/terraform-mcp-server'

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