Skip to main content
Glama

update_table_sql

Replace a specific SQL line or block inside a Power BI table’s Value.NativeQuery expression. Preview the proposed change with dry-run, then write and validate the update.

Instructions

Surgically replace a line or block inside a table's Value.NativeQuery SQL expression.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "old_text": "<old_text>",
      "new_text": "<new_text>"
    },
    "name": "update_table_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoWhen true, return the proposed ChangePlan without modifying files. Defaults to true. Set false to execute the write with post-write validation.
new_textYesReplacement SQL line or block.
old_textYesExact SQL line or block to replace.
partitionNoOptional partition name.
workspaceNoWorkspace identifier returned by list_workspaces (prefer workspace_id or unique name). Optional when the server is bound to a single workspace.
table_nameNoTable name containing the SQL partition.
expected_replacementsNoOptional guard requiring an exact number of matches.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden for a mutation tool, but it only implies a write via 'replace'. It says nothing about whether changes are applied to files, how matching is enforced, what happens on zero or multiple matches, or how the ChangePlan validation behaves — all of which the schema merely alludes to.

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?

One tightly written sentence with the target resource front-loaded and no filler. It is efficient, though the brevity borders on under-specification for a mutating tool with seven parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The existence of an output schema means the ChangePlan need not be described, and the input schema documents every parameter. However, for a file-mutating tool with no annotations, the description omits the dry-run-first workflow and match-count semantics that an agent needs to invoke it safely.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all seven parameters including dry_run, expected_replacements, and workspace scoping. The description's 'surgically replace a line or block' mildly reinforces the exact-match intent of old_text/new_text but adds no syntax, formatting, or matching rules beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('replace') and a precise target ('a line or block inside a table's Value.NativeQuery SQL expression'), which is more specific than a generic update. It does not name or contrast with the read-side siblings such as get_table_sql, so an agent must infer the pairing from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use or when-not-to-use guidance, no mention of previewing with get_table_sql first, and no reference to the dry_run default of true that governs whether the edit is actually applied. The agent must infer the workflow entirely from the schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.