Skip to main content
Glama

Run a tenant resource query

cs_admin_query

Run tenant-level resource queries using the admin center query language, then optionally save results as JSON, list, or CSV. Uses 'pac admin query' with the active authentication profile.

Instructions

Run a tenant-level resource query (the admin centre's own query language) and optionally write the results to a file as JSON, list or CSV. Runs 'pac admin query' with the active pac auth profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for pac (for project commands: the solution project folder)
queryNoResource query JSON as a string
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.
queryFileNoFile containing the query JSON
backgroundNoRun in the background and return a jobId immediately, for a command that takes longer than the client will wait. Poll cs_job_status.
outputFileNoWhere to save the results
outputTypeNoJson, List or Grid (default Grid)
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

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses the underlying command and that results can be written to a file, but never says whether a resource query can mutate tenant state, what permissions the profile needs, or how background jobs behave beyond the schema's own text. For an unannotated tool that shells out to a CLI, that is a meaningful gap.

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?

Two tight sentences with no filler, and the core action is front-loaded ahead of the output-file clause. Efficient, though the second sentence's CSV/Grid slip costs it a point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 8 optional parameters, no annotations and no output schema, the description does enough to identify the operation but not enough to call it safely: no read/write semantics, no guidance on query vs queryFile, and a wrong outputType value. The schema's per-parameter text covers the defaults, which keeps this at a minimum-viable 3.

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

Parameters2/5

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

Schema coverage is 100%, so the baseline would be 3, but the description actively misleads on outputType: it says 'JSON, list or CSV' while the enum only allows Json, List, Grid. An agent following the prose could pass 'CSV' and fail. The rest of the description adds nothing 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?

Clear verb+resource: 'Run a tenant-level resource query' plus the concrete mechanism ('pac admin query'), which distinguishes it from deterministic siblings like cs_admin_list_environments or cs_admin_list_tenant_settings. It doesn't explicitly say how it differs from those narrower list tools, but the generic query framing implies the distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance and no named alternatives, despite sitting among 90+ siblings with many overlapping admin-read tools. An agent is left to infer that this is the escape hatch when a dedicated cs_admin_* list tool doesn't cover the needed resource, and nothing states that.

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