Skip to main content
Glama

IaC stack outputs

get_stack_outputs
Read-only

Retrieve all stack outputs and cross-stack exports from local IaC files to wire Terraform remote state or CloudFormation Fn::ImportValue references.

Instructions

Returns all stack outputs and cross-stack exports parsed from local IaC files: Terraform output blocks and CloudFormation/CDK Outputs sections, with name, description, export name, and the raw value expression. Call this when wiring cross-stack references (Fn::ImportValue, terraform_remote_state) or when you need the exported name of a resource defined in another stack. Do NOT call for live resource attributes — outputs come from local IaC files, not the deployed stack. CDK outputs carry stale: true with a staleReason when their cdk.out template is no longer instantiated in the CDK app or predates the last cdk synth — do not rely on a stale export without re-synthesizing.

Input Schema

NameRequiredDescriptionDefault
maxAgeSecondsNoFreshness tolerance in seconds. Advisory: the answer is returned either way, with dataHealth.withinRequestedAge reporting whether it met the tolerance. Nothing re-reads AWS on a tool call — run `infrawise analyze` to refresh. Pass a small value for point-in-time questions ("does this queue have a DLQ right now"); omit it for architecture questions where a day-old snapshot is fine.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.26.1
    • changedInput schema / properties / maxAgeSeconds / description
      Previous value: -"Refuse to answer from an analysis older than this many seconds. Use a small value for point-in-time questions (\"does this queue have a DLQ right now\"); omit it for architecture questions where a day-old snapshot is fine."New value: +"Freshness tolerance in seconds. Advisory: the answer is returned either way, with dataHealth.withinRequestedAge reporting whether it met the tolerance. Nothing re-reads AWS on a tool call — run `infrawise analyze` to refresh. Pass a small value for point-in-time questions (\"does this queue have a DLQ right now\"); omit it for architecture questions where a day-old snapshot is fine."
  2. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / maxAgeSeconds
      Added value: +{
      +  "description": "Refuse to answer from an analysis older than this many seconds. Use a small value for point-in-time questions (\"does this queue have a DLQ right now\"); omit it for architecture questions where a day-old snapshot is fine.",
      +  "type": "number"
      +}
  3. Addedv0.21.0
  4. Removedv0.19.7
  5. Addedv0.14.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint and openWorldHint, so safety is already covered; the description goes further by disclosing the data provenance (parsed from local IaC files, not the deployed stack), the staleness model (CDK outputs carry stale:true and staleReason), and the remediation ('re-synthesizing'). This is meaningful behavioral context beyond the structured annotations.

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 primary purpose is front-loaded in the first clause, followed by return fields, usage triggers, exclusions, and the staleness caveat. Each sentence carries distinct information with no redundancy or filler.

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?

With no output schema, the description compensates by naming the returned fields (name, description, export name, raw value expression) and the stale/staleReason flags. Combined with the annotation-covered safety profile and a fully documented lone parameter, an agent has everything needed to call and interpret this tool.

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 coverage is 100% and the single maxAgeSeconds parameter is fully documented in the schema, including the advisory-with-dataHealth.withinRequestedAge behavior. The description adds freshness framing but no syntax or format detail beyond what the schema already provides, so the baseline 3 applies.

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?

States a specific verb and resource ('Returns all stack outputs and cross-stack exports') and enumerates the sources (Terraform output blocks, CloudFormation/CDK Outputs sections) and returned fields. It also explicitly scopes itself against live attributes ('outputs come from local IaC files, not the deployed stack'), so an agent can distinguish it from the resource-introspection siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use triggers ('wiring cross-stack references (Fn::ImportValue, terraform_remote_state) or when you need the exported name of a resource defined in another stack') and an explicit when-not ('Do NOT call for live resource attributes'). This leaves nothing to inference for tool selection.

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