Skip to main content
Glama

Set environment administration mode

cs_admin_set_runtime_state

Switch a live environment between AdminMode and Enabled to control admin-only access and background operations; requires confirm:true, otherwise returns a dry run.

Instructions

Put an environment into administration mode (only admins can use it) or back, and control background operations. Changes a live environment: requires confirm: true. Runs 'pac admin set-runtime-state' with the active pac auth profile. Mutates a live environment: requires confirm: true (a dry run otherwise).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for pac (for project commands: the solution project folder)
asyncNoRun the operation asynchronously
confirmNoRequired to actually perform a change in a live environment. Without it the tool returns a dry run.
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 or URL
runtimeStateYesAdminMode or Enabled
timeoutSecondsNoDefault 600
maxAsyncWaitTimeNoMax asynchronous wait time in minutes (default 60)
backgroundOperationsNoBackground operations state

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.7/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden. It does well by disclosing that this mutates a live environment, that confirm: true is mandatory and the call otherwise returns a dry run, and that it runs 'pac admin set-runtime-state' under the active pac auth profile. It omits the blast radius (does enabling AdminMode kill in-flight background operations?) and reversibility details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence is well front-loaded, but the description repeats itself: 'Changes a live environment: requires confirm: true' and 'Mutates a live environment: requires confirm: true (a dry run otherwise)' say the same thing twice in different words. That redundancy costs space that could have documented backgroundOperations or async behavior.

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 10-parameter, no-output-schema, no-annotation mutation tool, the description covers the essential risk profile: live-environment mutation, mandatory confirm with dry-run fallback, and the auth context. Remaining gaps (effect on running operations, what backgroundOperations accepts, async/background interplay) are minor since the schema documents those parameters with full coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a baseline of 3 applies and the description must add meaning on top. It does: runtimeState values are glossed ('administration mode (only admins can use it) or back'), and it clarifies confirm's dry-run behavior and the profile source. The backgroundOperations parameter is only vaguely gestured at ('control background operations'), which keeps this from a 5.

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?

The description names a specific verb+resource (put an environment into/out of administration mode) and states what that mode means ('only admins can use it'), plus the secondary control of background operations. It is distinguishable from the many cs_admin_* siblings, which handle users, backups, environments, and settings, not runtime state. It stops short of explicitly naming a sibling it is not, so it lands at 4 rather than 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?

It gives an important precondition ('requires confirm: true', otherwise a dry run) and frames the operation as acting on a live environment, which implies when it is appropriate. However, it never states when to use this vs. alternatives (e.g. cs_admin_reset_environment or cs_update_settings) or when to avoid it, e.g. while other admin operations are in flight. Guidance is implied rather than explicit.

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