Skip to main content
Glama

set_data_source

Set up or replace a Power BI data source, choosing between structured connection details or legacy provider connection strings.

Instructions

Create or update a first-class DataSource object (separate from raw M partitions). kind = Structured (modern Power Query - connectionDetails and credential are each a flat JSON object of key/value pairs, e.g. connectionDetails={"protocol":"tds","server":"srv","database":"db"}) or Provider (legacy - connectionString + provider + impersonation = Default | ImpersonateAccount | ImpersonateAnonymous | ImpersonateCurrentUser | ImpersonateServiceAccount | ImpersonateUnattendedAccount). Replaces a same-named data source in place.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesStructured | Provider
nameYes
providerNo(Provider) the OLE DB/provider name
sessionIdYes
credentialNo(Structured) flat JSON object of credential key/value pairs
impersonationNo(Provider) impersonation mode
connectionStringNo(Provider) the connection string
connectionDetailsNo(Structured) flat JSON object of connection-detail key/value pairs
Behavior4/5

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

With no annotations provided, the description carries the full burden. It transparently states that the tool 'replaces a same-named data source in place' and explains the structured vs provider behavior with detailed field requirements. While it does not mention permissions, rate limits, or rollback behavior, it reveals the key mutating/replacement semantic and the two distinct configuration modes.

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 dense but every sentence contributes value. It packs a lot of detail (kind distinctions, JSON requirement, impersonation enum, replacement behavior) without fluff. It is slightly long but appropriately so given the dual-mode nature of the tool. No wasted words.

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?

For an 8-parameter, no-output-schema tool, the description covers the core behavior (create/update, replace-in-place, kind-specific parameters) and provides examples. It does not describe return values or error conditions, but with no output schema and a well-scoped purpose, it is adequately complete for an agent to invoke correctly.

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?

The description adds substantial meaning beyond the input schema: it explains the 'kind' values, groups parameters by kind, specifies that connectionDetails and credential are flat JSON objects with an explicit example, and enumerates all impersonation modes (Default, ImpersonateAccount, etc.). This is more than the schema's terse descriptions provide, making the parameters actionable.

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+resource: 'Create or update a first-class DataSource object (separate from raw M partitions).' This clearly distinguishes the tool from siblings like set_data_coverage or set_data_labels by scoping it to DataSource objects, and it clarifies the two kinds (Structured vs Provider). The purpose is unambiguous and well-differentiated.

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?

The description provides clear context for when to use Structured vs Provider kinds, including the parameter shapes for each (connectionDetails/credential vs connectionString/provider/impersonation). It does not explicitly name alternative tools or state when not to use this tool, but the context is strong enough that an agent can infer appropriate use cases.

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/cyphonica/powerbi-pbix-mcp'

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