Skip to main content
Glama
dax-query-server

dax-query-server

by wes-stone

save_validated_query

Saves a known-good DAX query as a reusable, connection-scoped pattern and creates its metadata and .dax files; validation passes only after the query executes successfully.

Instructions

Save a known-good DAX pattern to a connection-scoped validated query library.

This creates two files under <connection_name>.validated_queries/: a metadata YAML file and a sibling .dax file. Validation metadata is not marked passed until validate_query_library executes the query successfully.

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>",
      "description": "<description>"
    },
    "name": "save_validated_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNo
queryYes
query_idNo
overwriteNo
table_nameNo
descriptionYes
display_nameNo
connection_nameYes
connections_dirNoConnections
parameters_jsonNo
sample_parameters_jsonNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.8

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden and does disclose real side effects: two files created under <connection_name>.validated_queries/ (a YAML metadata file and a sibling .dax file) plus the deferred validation state. However, it is silent on overwrite semantics when the query_id already exists, collision behavior, and permission requirements, all of which matter for a write operation.

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?

Front-loaded with the action and scope, then the concrete artifact layout, then the validation caveat. Three short sentences with little waste; only the empty line break hurts readability marginally.

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?

An output schema exists so return values need not be explained, but for a write tool with zero annotations and 11 undocumented parameters the description is too thin. The most consequential unknowns for correct invocation, overwrite behavior and the meaning of the id/parameters fields, are left unaddressed.

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 11 parameters, so the description must compensate and largely does not. It never explains query_id vs display_name, tags, table_name, parameters_json/sample_parameters_json, connections_dir, or overwrite, leaving the caller to guess at string formats and side effects.

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 ('Save a known-good DAX pattern to a connection-scoped validated query library') and even names the on-disk location. It does not explicitly contrast with siblings like save_query_to_pack or save_query_builder, but the 'validated query library' scope is distinctive enough to identify the tool.

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

Usage Guidelines3/5

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

Usage is only implied: the note that validation metadata isn't marked passed until validate_query_library runs establishes a follow-up workflow, which is helpful. There is no explicit 'use this instead of X' guidance, no preconditions (e.g., connection must exist), and no statement about when not to save.

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