Skip to main content
Glama
dax-query-server

dax-query-server

by wes-stone

save_query_builder

Saves .dax and .dax.queryBuilder artifacts from a structured query builder JSON payload into a specified directory for later reuse.

Instructions

Save .dax and .dax.queryBuilder artifacts from a structured query builder JSON payload.

STOP — before calling this tool you MUST:

  1. Ask the user: "Where should I save the query files?" and wait for their answer.

  2. Call get_query_builder_schema to see the required JSON shape.

  3. Use the user's answer as queries_dir. If queries_dir is empty this tool will error.

The JSON payload requires these fields:

  • "name": a slug for the query (e.g. "copilot_acr")

  • "connection_name": the connection to use

  • "columns": list of column expressions like "'Calendar'[Fiscal Month]"

  • "measures": list of {caption, expression} objects

  • "filters": list of filter definitions

  • "order_by": list of sort definitions

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": {
      "query_builder_json": "<query_builder_json>"
    },
    "name": "save_query_builder"
  }
}

Input Schema

NameRequiredDescriptionDefault
overwriteNo
queries_dirNo
query_builder_jsonYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.8

TDQS

A3.6/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 behavioral burden. It discloses artifact creation, a required user interaction, and the empty queries_dir error, but it never explains the overwrite parameter or what happens to existing files. Return-value behavior is partly covered by the output schema, but mutation and overwrite semantics remain incomplete.

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 front-loaded with a STOP block and numbered prerequisites, then lists payload fields. It is somewhat verbose, but every section has operational value and the structure is easy to follow.

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 tool has moderate complexity, no annotations, and an output schema. The description covers the workflow and query_builder_json contents but omits overwrite behavior and does not clarify when to choose this save tool over sibling save tools. Those gaps prevent it from being fully complete.

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 0%, so the description must compensate. It usefully explains that queries_dir comes from the user and cannot be empty, and it enumerates required fields inside query_builder_json. However, it leaves the overwrite parameter entirely unexplained and delegates full JSON shape discovery to get_query_builder_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?

The description states a specific action and artifacts: save .dax and .dax.queryBuilder artifacts from a structured query builder JSON payload. It is clear what the tool does, but it does not distinguish itself from sibling save tools such as save_query_to_pack or save_validated_query.

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?

It gives explicit mandatory pre-call steps: ask the user where to save, call get_query_builder_schema, and use the answer as queries_dir. It also states that an empty queries_dir causes an error. It lacks when-not guidance and explicit differentiation from alternative save tools.

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