Skip to main content
Glama
sdebruyn

fabric-dw-mcp-cli

by sdebruyn

set_cluster_columns

Change or remove clustering columns on a table by rebuilding it transactionally with a CTAS-swap, ensuring no orphan tables on failure.

Instructions

Change (or remove) the data-clustering columns of an existing table.

Rebuilds the table via a transactional CTAS-swap:

  1. CREATE TABLE [schema].[__recluster_<hex>] [WITH (CLUSTER BY (...))] AS SELECT * FROM [schema].[orig]

  2. DROP TABLE [schema].[orig]

  3. EXEC sp_rename to restore the original name

All three steps run inside ONE transaction. Any failure rolls back automatically — no orphan temp table is left behind.

CAUTION: This operation copies the full table (runtime is proportional to table size). Dependent views and stored procedures that reference this table by name are NOT automatically updated by sp_rename and may need refreshing after the swap.

Only supported on Fabric Data Warehouses (not SQL Analytics Endpoints).

Args: workspace: Workspace name or GUID. item: Warehouse name or GUID. SQL Analytics Endpoints are rejected. qualified_name: Dot-separated qualified table name, e.g. dbo.sales. cluster_by: New list of column names for the CLUSTER BY clause (up to 4). Pass null or an empty list to remove clustering (rebuilds table without CLUSTER BY).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemYes
workspaceYes
cluster_byNo
qualified_nameYes

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 fully bears the burden. It details the transactional CTAS-swap process, runtime proportional to table size, dependent views needing refresh, and platform restriction. This is highly transparent.

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 well-structured with sections and front-loaded purpose. While somewhat long, every sentence adds value. Could be slightly more concise but still effective.

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 tool's complexity (transactional swap, dependent objects), and that output schema likely covers return values, the description is complete. It covers all critical behavioral and parameter aspects.

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 compensate. It explains all four parameters: workspace, item, qualified_name, and cluster_by (including null/empty to remove clustering). This 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?

The description explicitly states it changes or removes data-clustering columns, with clear verb and resource. It differentiates from sibling tools like get_cluster_columns (read-only) and other table operations.

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?

It provides clear context: when to use (change/remove clustering), platform restriction (only Fabric Data Warehouses), and caution about performance impact. It doesn't explicitly list alternatives among siblings but the context is sufficient.

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