Skip to main content
Glama

Terraform workspaces

tf_workspaces
Read-only

List all Terraform workspaces for a project directory and show which workspace is currently active.

Instructions

List Terraform workspaces with current workspace marked.

Input Schema

NameRequiredDescriptionDefault
cwdYesTerraform project directory
binaryNoterraform or tofu (default $TF_BINARY, else terraform)

Output Schema

NameRequiredDescriptionDefault
currentYes
retainedNo
workspacesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

A3.5/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read operation, so the description's added detail that the current workspace is marked is modest but useful output context. It does not mention error behavior outside a Terraform directory or whether the workspace list is cached.

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?

A single front-loaded sentence with no wasted words. It is appropriately sized for a simple read-only list operation.

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?

With readOnlyHint, 100% schema coverage, and an output schema, the description is largely complete for a simple workspace-listing tool. The only mild gap is the absence of guidance on when to prefer this over tf_state_list.

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%, with cwd and binary both documented in the schema, so the baseline is 3. The description adds no additional parameter meaning beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ("List") and resource ("Terraform workspaces"), plus a useful detail that the current workspace is marked. It does not distinguish itself from sibling tools like tf_state_list, so it stops short of a 5.

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 listing purpose implies when to use it, but there are no explicit conditions, exclusions, or named alternatives among the many tf_* siblings. An agent must infer that this is the workspace inventory tool.

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