Skip to main content
Glama

Select the default environment for the pac profile

cs_env_select

Set the default environment for pac commands to avoid specifying it repeatedly. Runs 'pac env select' with the active auth profile.

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. Changed1 schema field changedv0.1.8
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.5

TDQS

A3.8/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 burden, and it does add useful context: this mutates a LOCAL profile setting and runs 'pac env select' against the active auth profile, so the agent knows it is not a cloud-side change. It omits idempotency, which profile is affected, whether it errors when no auth profile is active, and any auth/permission requirements.

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, front-loaded with the effect and followed by the underlying mechanism. Every clause earns its place with no filler.

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?

For a simple local-config mutation with full schema coverage and no output schema, the description conveys purpose, mechanism, and scope adequately. It could note that the setting is profile-scoped and whether it requires an authenticated profile, but nothing critical for correct invocation is missing.

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 schema already documents all five parameters including environment, profile, cwd, background, and timeoutSeconds. The description adds no parameter-level detail beyond the schema, so the baseline 3 is appropriate.

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 (Set) plus the exact resource and scope: the default environment pac commands use when none is passed, qualified as a local profile setting. This cleanly distinguishes it from read-oriented siblings like cs_env_list, cs_env_who, and cs_env_fetch, and from cs_select_auth_profile (which selects an auth profile, not an environment).

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 phrase 'when none is passed' implies the use case (establishing a default so later pac commands don't need an explicit environment), but there is no explicit when-to-use/when-not guidance, no prerequisites, and no named alternative. Usage is inferable rather than stated.

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