Skip to main content
Glama
sdebruyn

fabric-dw-mcp-cli

by sdebruyn

execute_sql

Execute arbitrary SQL or multi-statement batches against a Microsoft Fabric warehouse or SQL Analytics endpoint, with control over max rows and clear truncation reporting.

Instructions

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

Prefer dedicated tools for common operations: use read_table or read_view to fetch rows, count_table_rows or count_view_rows to count, list_tables, list_views, list_schemas to discover objects, get_table_columns or get_view_columns to inspect schemas, and delete_table, rename_table, or clear_table to mutate. Dedicated tools return structured, typed results with no dialect pitfalls or batch-truncation surprises.

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; the tool keeps the last result set that has a column list (i.e. the last query), not the last statement. A batch that ends with DDL/DML after a query, such as SELECT id FROM t; UPDATE t SET x = 1;, returns the SELECT result and does not separately report that the UPDATE ran. A statement with no result set at all (DDL/DML with nothing else in the batch) returns 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
itemYes
queryYes
max_rowsNo
workspaceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure, and it does so thoroughly. It warns that DDL and DML are permitted, explains multi-statement batch result selection, describes how datetime, Decimal, and bytes values are serialized, and documents truncation behavior via max_rows + 1.

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 long but every major block earns its place: purpose, usage guidance, safety warning, batch semantics, serialization details, performance advice, and parameter meanings. It is front-loaded with the most decision-relevant information and uses clear paragraph separation.

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?

For a high-complexity, potentially destructive tool with no annotations, the description is exceptionally complete. It covers safety, alternative routing, batch semantics, return value structure, type serialization, and performance considerations, leaving little for an agent to guess.

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 the description must compensate, and it does. Each parameter is explained beyond its raw schema definition: workspace and item accept names or GUIDs, query is a SQL statement or batch, and max_rows has bounds, default, and truncation implications.

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 a specific verb and resource: 'Execute an arbitrary SQL statement or batch against a warehouse or SQL Analytics Endpoint.' It clearly distinguishes this generic SQL tool from the many dedicated sibling tools by emphasizing arbitrariness and raw SQL execution.

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?

The description explicitly lists dedicated alternatives (read_table, read_view, count_table_rows, etc.) and states to prefer them for common operations. It also gives direct when-to-use guidance: use execute_sql only when the user explicitly requests data modification, and default to SELECT for read-only investigation.

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