Skip to main content
Glama
ryanmichaeljames

Dataverse MCP Server

dataverse_validate_fetchxml

Read-onlyIdempotent

Check a FetchXML query for problems and performance warnings WITHOUT running it.

Instructions

Check a FetchXML query for problems and performance warnings WITHOUT running it.

Pre-flight companion to dataverse_execute_fetchxml. Calls the unbound ValidateFetchXmlExpression function, which parses and analyses the expression server-side and reports validation errors plus performance suggestions (for example unrestricted column lists or filters that cannot use an index). No records are read and nothing is modified. Run it before executing an expensive or machine-generated query — a FetchXML query that returns results can still be a query that scans a table.

No entity set name is required: the root inside the document identifies the table.

HTTP 200 DOES NOT MEAN THE QUERY IS VALID — check has_errors / error_count. A FetchXml naming a table or attribute that does not exist comes back as a successful HTTP 200 carrying an error-severity message ("Error handling FetchXML: The entity with a name = '...' was not found in the MetadataCache"), not as an HTTP 400. Treating a non-error response as "this query works" is wrong. Read has_errors first, then errors for the error texts.

Findings are reported as: count (total messages), error_count, warning_count (count == error_count + warning_count, so nothing is dropped), has_errors, and errors (the error texts). The severity mapping is OBSERVED, NOT DOCUMENTED: live responses used 1 for performance warnings and 3 for errors, so severity

= 3 is counted as an error and < 3 as a warning. Any message whose severity is missing or not an integer is bucketed conservatively as an error rather than assumed benign, and still appears in count.

The full payload is also returned unchanged under raw_response (minus the @odata envelope): ValidationResults.Helplink, each message's LocalizedMessageText and its OptionalPropertyBag (which carries details such as AttributeCount/AttributeLimit) are worth reading. If the payload is not in the expected ValidationResults.Messages shape it is returned raw with normalized=false and no counts, rather than being guessed at.

The query is checked locally for XML well-formedness first, using a hardened parser that rejects DTDs and entity declarations, so malformed or hostile markup fails immediately with a clear message instead of costing a round trip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond the annotations (readOnlyHint=true, idempotentHint=true, destructiveHint=false), the description adds critical behavioral traits: HTTP 200 does not imply validity, severity mapping is observed not documented, unknown severities are treated as errors, raw_response is returned unchanged, and the local XML parser rejects DTDs/entities. This exceeds what annotations convey.

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?

The description is lengthy but front-loaded with a crisp one-sentence purpose, followed by logically grouped paragraphs covering behavior, output shape, and edge cases. Every paragraph serves a distinct function, though some details (e.g., severity mapping) could be condensed without losing meaning. Overall it is well-structured and information-dense.

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

Completeness5/5

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

Despite having an output schema, the description generously explains the response shape: count, error_count, warning_count, has_errors, errors, raw_response, and the normalized=false fallback. It also covers edge cases like HTTP 414 and non-200 validation errors. For a tool with this complexity and safety-critical validation semantics, the description is fully complete.

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?

The input schema includes exhaustive descriptions for both fetch_xml and dataverse_url, including encoding constraints and shortening advice. The tool description adds a small contextual note about the root <entity name="..."> identifying the table, but this is also present in the schema. Since schema description coverage effectively handles parameter semantics, the tool description provides marginal added value, matching the baseline 3.

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?

The description opens with 'Check a FetchXML query for problems and performance warnings WITHOUT running it', clearly identifying the verb (check), resource (FetchXML query), and distinguishing it from executing the query. It explicitly names the sibling dataverse_execute_fetchxml as the companion tool, making the tool's unique role unambiguous.

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

Usage Guidelines4/5

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

The description gives explicit usage guidance: 'Run it before executing an expensive or machine-generated query' and names dataverse_execute_fetchxml as the alternative when execution is desired. However, it does not mention when not to use it (e.g., for View XML) or list alternative validators like dataverse_validate_view, so it lacks explicit exclusions but still provides clear context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ryanmichaeljames/dataverse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server