Skip to main content
Glama

Choose environment

set_environment
Idempotent

Selects an environment to supply session variables for {{name}} placeholders, so you can switch from Local to Staging while keeping cookies and OAuth tokens.

Instructions

Choose the environment whose variables fill in {{name}} for the rest of this session, for example to switch from Local to Staging. The environment's variables are read again and variables set by earlier requests are cleared; cookies and OAuth tokens are kept.

Input Schema

NameRequiredDescriptionDefault
nameYesThe environment's name, as list_environments shows it.

Output Schema

NameRequiredDescriptionDefault
activeNo
environmentsNo
sessionVariablesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.19

TDQS

A4/5.0
Behavior5/5

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

Despite annotations only declaring safety flags, the description discloses the actual side effects: variables are re-read, variables set by earlier requests are cleared, and cookies/OAuth tokens are preserved. That is exactly the kind of non-obvious state consequence an agent needs before switching environments mid-session.

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?

Two tight sentences: the effect is front-loaded, then the state-preservation detail follows with no filler. Every clause carries information an agent cannot get from the structured fields.

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?

Output schema exists, so return values need no explanation, and the description covers the mutation's effect on session state well. It stops short of noting behavior for an invalid or unknown environment name, which is the one remaining gap for a state-mutating 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% for the single 'name' parameter, including the note that it matches list_environments output, so the schema does the heavy lifting. The example values 'Local' and 'Staging' add a little color but no syntax or format detail beyond the schema.

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 and resource ('Choose the environment') and explains the effect: its variables fill in {{name}} for the rest of the session. That is enough to separate it from list_environments, but it never contrasts with set_variables, which is the nearest ambiguous sibling.

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 'for example to switch from Local to Staging' clause implies the usage context, but there is no explicit when-to-use / when-not guidance and no named alternative. The routing hint ('as list_environments shows it') lives in the schema, not the description, so discoverability of valid values is only implied.

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