Skip to main content
Glama
Kenny-666

Dynamics 365 MCP Server

by Kenny-666

query_by_fetchxml

Executes FetchXML queries against Dataverse with explicit state policy and bounded paging, returning one page by default plus completeness and a continuation cursor.

Instructions

Execute FetchXML with explicit state policy and bounded native cookie/simple paging. Defaults to one page. Returns value, effective query, completeness and continuation; use fetch_all for multiple pages.

Input Schema

NameRequiredDescriptionDefault
fetch_allNoFollow server paging up to max_records/max_pages. Default false returns one page.
fetch_xmlNoThe FetchXML string to execute
max_pagesNoMaximum server pages read per call, default 10, when fetch_all=true.
page_sizeNoRequested server page size, default 500. Cannot be combined with top. FetchXML count is preserved unless the same value is supplied.
state_modeNolegacy preserves valid implicit statecode=0 filtering; all adds no state filter; values uses state_values validated against this table.
max_recordsNoMaximum records returned in this call, default 5000. Remaining records can be resumed with continuation.
continuationNoOpaque cursor from a previous result; valid for five minutes in this server connection. Resumes saved query and buffered records.
state_valuesNoExplicit numeric state values; requires state_mode=values.
formatted_valuesNoInclude formatted labels and display values returned by CRM.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/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. It does disclose useful behaviour: one page by default, bounded native cookie/simple paging, and the shape of the return value (value, effective query, completeness, continuation). It omits permission requirements, failure modes, and what happens when the query is rejected — reasonable but not rich for a query execution tool.

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 dense sentences with zero filler: behaviour first, return shape second, sibling/alternative routing third. Everything is front-loaded and each clause carries information.

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?

With nine parameters and no output schema, the description compensates by naming what is returned (value, effective query, completeness, continuation). That is enough for an agent to call it correctly, though the interplay between fetch_all, max_records and continuation could be spelled out more explicitly.

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 coverage is 100%, so every parameter (including state_mode's enum semantics and continuation's five-minute lifetime) is already documented in the schema. The description's only added parameter meaning is confirming the default single-page behaviour. Baseline 3 applies.

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?

States a specific verb and resource (execute FetchXML) plus the two defining characteristics: explicit state policy and bounded native paging. An agent knows exactly what the tool does, though the description does not distinguish itself from the sibling preview_fetchxml_query or search_records_by_odata.

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?

'Defaults to one page' and 'use fetch_all for multiple pages' give implied usage context, but fetch_all is a parameter of this same tool, not an alternative tool. There is no guidance on when to reach for this versus preview_fetchxml_query (to validate syntax) or search_records_by_odata (simpler filtering), both of which are plausible siblings.

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