Skip to main content
Glama
dax-query-server

dax-query-server

by wes-stone

export_to_csv

Exports DAX query results from a Power BI semantic model to a timestamped CSV file, returning the file path, row count, and column count.

Instructions

Export DAX query results to a timestamped CSV file.

Returns JSON with file_path, row_count, and column_count.

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_name": "<connection_name>",
      "query": "<query>",
      "output_dir": "<output_dir>"
    },
    "name": "export_to_csv"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
max_rowsNo
output_dirYes
connection_nameYes
connections_dirNoConnections
filename_prefixNoexport

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.8

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the key behavioral facts that a file is written with a timestamped name and that the call returns JSON metadata (file_path, row_count, column_count), which is genuinely useful. It says nothing about filesystem write permissions, whether an existing file is overwritten, how max_rows=null behaves, or what happens when the connection is invalid.

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 tight sentences with the core purpose front-loaded and no filler. The second sentence restates return values that the output schema already documents, which is mild redundancy rather than a real cost.

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

Completeness2/5

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

The output schema covers return values, so that sentence is optional, but the real gap is the six undocumented parameters at 0% schema coverage on a tool that writes files to disk. For a file-producing mutation with no annotations, the definition should say more about connection requirements, row limits, and output location semantics.

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 must compensate and largely does not. It implies a query is supplied and a file location is involved, but connection_name, connections_dir, filename_prefix, and max_rows are never explained or even hinted at. An agent cannot tell from the description what max_rows=null means or how filename_prefix affects the timestamped name.

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: 'Export DAX query results to a timestamped CSV file.' That is unambiguous and clearly distinct from siblings like export_query_pack or export_workstation, which operate on different resources. It stops short of explicitly contrasting itself with any alternative, so it is clear but not maximally differentiating.

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 when-to-use or when-not-to-use guidance, no mention of prerequisites such as an active/valid connection, and no reference to alternatives like copy_to_clipboard or quick_chart for agents that don't need a file artifact. The agent must infer the appropriate context entirely from the tool name and the word 'export'.

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