Skip to main content
Glama
sdebruyn

fabric-dw-mcp-cli

by sdebruyn

get_query_plan

Get the estimated execution plan for a SQL query without executing it. Retrieve SHOWPLAN_XML to analyze and optimize query performance in Fabric Warehouse and SQL Analytics Endpoints.

Instructions

Capture the estimated SHOWPLAN_XML execution plan for a SQL query without executing it.

This tool does NOT execute the query — it only retrieves the estimated execution plan as SHOWPLAN_XML. Because no data is modified, this tool is permitted even under FABRIC_MCP_READONLY=1.

The plan XML uses the standard namespace http://schemas.microsoft.com/sqlserver/2004/07/showplan and can be opened in SSMS, Azure Data Studio, or uploaded to pastetheplan.com for visual analysis.

Since the query is not executed, DDL/DML query text is safe to plan without modifying any data.

Supports both Warehouse and SQL Analytics Endpoint items.

Args: workspace: Workspace name or GUID. item: Warehouse or SQL Analytics Endpoint name or GUID. query: SQL statement to generate an estimated execution plan for.

Returns: A dict with key plan_xml (str) containing the SHOWPLAN_XML string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYes
itemYes
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Explains key behavioral traits: no execution, read-only safety, returns SHOWPLAN_XML, and supports both Warehouse and SQL Analytics Endpoint items. However, it lacks details about error handling or limitations like query size.

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?

Well-structured and concise: a one-sentence purpose, then paragraphs on safety, plan XML details, args, and return value. No extraneous content; front-loaded with key 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?

Given the 3 simple parameters and existence of output schema, the description covers purpose, safety, output format, and supported items. Minor gaps like error handling but overall adequate.

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?

With 0% schema description coverage, the description includes an Args section that briefly describes each parameter (workspace, item, query), adding basic meaning but lacking format details or examples.

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 clearly states the tool captures an estimated execution plan without executing the query, using specific verbs ('Capture', 'retrieves') and distinguishes it from similar tools that execute queries.

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

Usage Guidelines5/5

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

Explicitly states that the tool does NOT execute the query and is safe to use even under read-only mode, providing clear guidance on when to use it (for plan analysis) vs. alternatives like execute_sql.

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/sdebruyn/fabric-dw-mcp-cli'

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