Skip to main content
Glama
dax-query-server

dax-query-server

by wes-stone

run_ad_hoc_query

Read-only

Execute a DAX query against a raw connection string to retrieve Power BI semantic model results as a preformatted table with a numbered follow-up menu.

Instructions

Run a DAX query against a raw connection string.

IMPORTANT: This tool returns a COMPLETE, pre-formatted response for the user. Output the returned string as your ENTIRE response — do NOT summarize, truncate, or convert the table to bullet points. The output includes a data table and a numbered follow-up menu that must both appear.

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": {
      "connection_string": "<connection_string>",
      "query": "<query>"
    },
    "name": "run_ad_hoc_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
profileNo
max_rowsNo
preview_rowsNo
connection_stringYes
command_timeout_secondsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.8

TDQS

B3.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds the critical non-obvious behavior that this tool returns a pre-formatted, complete response that must be echoed verbatim, including a data table and a numbered follow-up menu. It does not mention the 1800-second default timeout or the preview/max rows interaction, which are the remaining behavioral gaps.

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?

Two short paragraphs with the purpose front-loaded and the output-handling constraint immediately after. The repeated 'do NOT summarize, truncate, or convert' phrasing is emphatic but each clause covers a distinct failure mode, so little is wasted.

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?

An output schema exists, so return values need not be spelled out, yet the description still usefully explains the output's mandatory structure. However, for a six-parameter tool with zero schema coverage, the absence of any parameter documentation leaves the definition incomplete for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0% across six parameters, so the description carries the full burden and largely fails: only 'DAX query' and 'raw connection string' hint at the two required fields. profile, max_rows, preview_rows, and command_timeout_seconds are completely unexplained in both schema and description.

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 and resource: run a DAX query. The phrase 'against a raw connection string' implicitly separates it from saved/named query siblings such as run_named_query or run_connection_query, though no sibling is named explicitly.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no named alternative. The 'IMPORTANT' block addresses response formatting, not tool selection, so an agent must infer which of the query-running siblings to pick.

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