Skip to main content
Glama

Select the default environment for the pac profile

cs_env_select

Set the active environment for pac commands when none is provided, using the selected auth profile via 'pac env select'.

Instructions

Set the environment that pac commands use when none is passed (local profile setting). Runs 'pac env select' with the active pac auth profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for pac (for project commands: the solution project folder)
profileNopac auth profile to run as: the admin account for tenant commands. Defaults to CPS_ADMIN_PROFILE for admin commands and CPS_PAC_PROFILE otherwise, then the active profile. cs_init lists the profiles.
backgroundNoRun in the background and return a jobId immediately, for a command that takes longer than the client will wait. Poll cs_job_status.
environmentYesEnvironment id, URL, unique or partial name
timeoutSecondsNoDefault 600

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses that this writes a 'local profile setting' and runs against the 'active pac auth profile', which hints at persistence and auth context. However, it does not mention the command's output, whether the change is immediate, or how it affects subsequent runs beyond the basic statement.

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 sentences with no filler. The first sentence states the core behavior and the second identifies the underlying command and auth context, making it easy to scan and act on.

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?

The tool is simple, has one required parameter, and a fully described schema.dll The description covers the key behavioral outcome and the underlying pac command, so an agent has enough to invoke it correctly. A short note on the expected effect or return value would be nice, but it is not essential here.

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 description coverage is 100%, so the baseline is 3. The description does not add detailed parameter guidance beyond stating that it uses the active pac auth profile, but the schema already documents environment, profile, cwd, background, and timeoutSeconds adequately.

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 clearly identifies the verb ('Set'), the resource ('the environment that pac commands use when none is passed'), and the scope ('local profile setting'). It also names the underlying command ('pac env select'), making it easy to distinguish from listing or querying tools like cs_env_list and cs_env_who.

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 phrase 'when none is passed' gives a clear condition for when this tool is relevant: it changes the default for commands that don't specify an environment. It does not explicitly mention alternative tools or when not to use it, but the context is clear enough for an agent to select it over env inspection commands.

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

Deploy Server

Other Tools