Skip to main content
Glama
sdebruyn

fabric-dw-mcp-cli

by sdebruyn

import_table_from_url

Load CSV or Parquet data from a remote URL into an existing warehouse table via COPY INTO, with append, fail, or atomic truncate options.

Instructions

Load data into an existing Data Warehouse table via COPY INTO from a remote URL.

The target table must already exist and have a compatible schema. For auto-create with schema inference from local files, use the CLI tables load --file --create command instead.

if_exists controls behaviour when the table already exists:

  • "fail" (default): raise an error if the table already exists, or if it does not exist (the table must be created first with create_empty_table or create_table).

  • "append": load rows into the existing table without modification. Raises an error if the table does not exist.

  • "truncate": TRUNCATE the existing table, then load, both inside a single transaction so a failed load leaves the existing rows intact (atomic replace). Requires FABRIC_MCP_ALLOW_DESTRUCTIVE=1. Raises an error if the table does not exist.

  • "replace": not supported for remote URLs (schema inference requires downloading the file). Use "truncate" to keep the current schema, or download locally and use the CLI with --create --if-exists replace.

Supported file types: CSV, PARQUET. JSON remote URLs require downloading and converting locally first; use the CLI tables load command for local files (including JSON).

For OneLake or same-tenant URLs, no credential is needed. For secured external URLs supply credential_type and the appropriate secret/identity values.

CAUTION: truncate is permanently destructive. Confirm the source URL and target table before calling.

Note: secret / identity values are accepted but are NEVER logged or included in any debug output.

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. url: Source URL (OneLake DFS URL or external Azure Blob URL). file_type: CSV or PARQUET. if_exists: Policy when the target table already exists. credential_type: Credential type for the source URL. secret: Credential secret (not logged). identity: Identity for managed-identity or service-principal. delimiter: CSV column delimiter. has_header: Whether the CSV file has a header row. encoding: CSV file encoding. field_quote: CSV field-quote character. row_terminator: CSV row terminator. max_errors: Maximum errors before aborting. rejected_row_location: URL for rejected-row output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
itemYes
secretNoCredential secret (SAS token, client secret, or account key). NEVER log or echo this value.
encodingNoCSV file encoding (e.g. 'UTF8', 'UTF8BOM').
identityNoIdentity value for managed-identity or service-principal credential types.
delimiterNoCSV column delimiter (e.g. ',', '\t').
file_typeYesFile type. JSON is not supported for remote URLs; download and convert locally first.
if_existsNoWhat to do when the target table exists or is absent. 'fail': error if the table already exists, or if it does not exist (default). 'append': load into the existing table; error if the table is absent. 'truncate': TRUNCATE then load (destructive). 'replace': DROP + recreate from inferred schema, then load (destructive).fail
workspaceYes
has_headerNoWhen True, the first CSV row is a header and is skipped.
max_errorsNoMaximum number of errors before aborting.
field_quoteNoCSV field-quote character.
qualified_nameYes
row_terminatorNoCSV row terminator (e.g. '\n', '\r\n').
credential_typeNoCredential type for secured external URLs. Use 'none' for OneLake or public URLs.none
rejected_row_locationNoURL to write rejected rows to.

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 the full burden of behavioral disclosure and does so thoroughly. It discloses that truncate is atomic and permanently destructive, that it requires FABRIC_MCP_ALLOW_DESTRUCTIVE=1, that SQL Analytics Endpoints are rejected, that JSON is unsupported for remote URLs, and that secrets are never logged. This goes well beyond basic purpose and prevents unsafe calls.

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 appropriately so for a 16-parameter tool with destructive modes. It is front-loaded with the core purpose, then uses bullets and clear sections for if_exists behavior, file-type constraints, credentials, and warnings. The CAUTION note earns its place given the permanent destructiveness of truncate.

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 no annotations and a high-complexity 16-parameter tool, the description is effectively complete. It covers prerequisites, unsupported modes, credential handling, destructive behavior, error semantics for if_exists, and alternative workflows, while the output schema covers return-value details. An agent has sufficient context to invoke the tool safely and correctly.

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

Parameters4/5

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

Schema description coverage is 75%, so the schema already does much of the work; the description still adds meaningful semantics by explaining that item rejects SQL Analytics Endpoints, that qualified_name is dot-separated, and what URL kinds are expected. Its if_exists bullets are also more actionable than the schema enum descriptions. Minor friction remains: the schema presents 'replace' as a valid option while the description says it is unsupported for remote URLs.

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 first sentence states a specific action and mechanism: loading data into an existing Data Warehouse table via COPY INTO from a remote URL. It also clearly imposes the prerequisite that the target table must already exist, separating it from create/delete/query tools. The auto-create CLI note further distinguishes it from schema-inference-based loading, though the sibling load_table_from_url is not explicitly differentiated.

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 says when to use the tool: remote URL loads into an existing table. It also says when not to: auto-create with schema inference from local files should use the CLI tables load --file --create command, and JSON remote URLs require local conversion and CLI use. The if_exists section additionally routes 'replace' cases to truncate or the local CLI, which is concrete, actionable guidance.

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