Skip to main content
Glama

Run a FetchXML query

cs_env_fetch

Run read-only FetchXML queries against Dataverse via pac to inspect Copilot Studio bot and botcomponent rows without an MSAL sign-in.

Instructions

Run a FetchXML query against Dataverse through pac (read-only), e.g. to inspect bot or botcomponent rows without an MSAL sign-in. Runs 'pac env fetch' with the active pac auth profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for pac (for project commands: the solution project folder)
xmlNoFetchXML query text
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.
xmlFileNoFile containing the FetchXML query
backgroundNoRun in the background and return a jobId immediately, for a command that takes longer than the client will wait. Poll cs_job_status.
environmentNoEnvironment id or URL; default: the environment of the active pac auth profile
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.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose that the operation is read-only, runs through pac, uses the active pac auth profile, and avoids MSAL sign-in. However, it does not describe return behavior, error conditions, permission requirements, or query-cost considerations.

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?

The description is short and front-loaded: the first sentence states the action, target, and read-only nature; the second adds the concrete mechanism and example. Every sentence contributes useful context without repetition.

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 seven parameters, no annotations, and no output schema, the description does a reasonable job of covering purpose, auth context, and read-only behavior. It does not explain what the query returns or how results are shaped, and it does not route the agent among related query tools, leaving gaps for an agent invoking it in a large sibling set.

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 itself documents all seven parameters in detail. The description reinforces the active pac auth profile and XML query concept but adds little parameter-level meaning beyond what the schema already provides. Baseline 3 is appropriate.

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 gives a specific verb and resource: run a FetchXML query against Dataverse through pac. It also frames it as read-only and mentions an example use case, inspecting bot or botcomponent rows without MSAL sign-in. It does not explicitly differentiate the tool from sibling query-related tools such as cs_admin_query, but the core purpose is clear.

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 example 'to inspect bot or botcomponent rows without an MSAL sign-in' implies when the tool is useful, but it does not state when to use it instead of alternatives like cs_admin_query or cs_lookup_schema. There are no exclusions or prerequisite guidance beyond the active pac auth profile.

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