Skip to main content
Glama
sdebruyn

fabric-dw-mcp-cli

by sdebruyn

execute_sql

Execute SQL commands (SELECT, DDL, DML) on a Fabric Warehouse or SQL Analytics Endpoint. Returns structured results with truncation detection.

Instructions

Execute an arbitrary SQL statement or batch against a warehouse or SQL Analytics Endpoint.

WARNING: this tool executes arbitrary SQL against the target. DDL (DROP, ALTER, TRUNCATE) and DML (DELETE, UPDATE) are permitted unless FABRIC_MCP_READONLY=1 is set. Use only when the user explicitly requests data modification. Default to SELECT when the user's intent is read-only investigation.

Supports both Warehouse and SQL Analytics Endpoint items. Multi-statement batches are allowed; only the last result set is returned. DDL/DML statements that produce no result set return columns=[] and rows=[].

datetime and Decimal column values are pre-serialised to strings. bytes / varbinary columns are base64-encoded and their column names are suffixed with __base64.

For large tables, add a TOP clause or WHERE predicate to the query rather than relying solely on max_rows. The driver fetches at most max_rows + 1 rows (enough to detect truncation) so memory is bounded, but pushing the limit into the query itself is always more efficient.

Args: workspace: Workspace name or GUID. item: Warehouse or SQL Analytics Endpoint name or GUID. query: SQL statement or batch to execute. max_rows: Maximum rows to return (1-10000, default 1000). When the result set is larger the response includes "truncated": true.

Returns: A dict with keys columns (list[str]), rows (list[list[Any]]), rowcount (int; -1 when the driver does not report a count), row_count_returned (int), and truncated (bool).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYes
itemYes
queryYes
max_rowsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations provided, so description carries full burden. Discloses arbitrary execution, permission for DDL/DML, batch behavior (only last result set returned), serialization of datetime/Decimal/bytes, memory bounds via max_rows+1, and truncation flag. Comprehensive.

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?

Well-structured with clear paragraphs, bullet points, and an Args/Returns section. Front-loaded with core purpose and warnings. Slightly verbose but each sentence adds value.

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?

Given the complexity of arbitrary SQL, no annotations, and no schema descriptions, the description is highly complete. Covers all behavioral traits, edge cases, return format, and performance considerations. An agent can confidently invoke this tool.

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

Parameters5/5

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

Schema description coverage is 0%, so description must explain parameters. The Args section thoroughly describes workspace, item, query, and max_rows, including their purpose, allowed values, and default behavior. Adds significant meaning beyond the schema.

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?

Clearly states 'Execute an arbitrary SQL statement or batch against a warehouse or SQL Analytics Endpoint'. Specific verb and resource, and distinguishes from sibling tools that are specialized operations (create, drop, read, etc.).

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?

Explicitly warns about DDL/DML risks, mentions readonly mode, recommends defaulting to SELECT, and advises using TOP or WHERE for large tables. Could explicitly contrast with sibling tools for when to use them instead, but the guidance is clear.

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