Skip to main content
Glama

format_dax

Standardize DAX expressions by uppercasing functions and normalizing operator spacing, either standalone or in TMDL files. Use it to produce consistent, readable measures before applying changes.

Instructions

Standardize DAX formatting (uppercase functions, clean operator spacing) standalone or in TMDL.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "format_dax"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableNoOptional table name.
dry_runNoWhen true, return the proposed ChangePlan without modifying files. Defaults to true. Set false to execute the write with post-write validation.
workspaceNoWorkspace identifier returned by list_workspaces (prefer workspace_id or unique name). Optional when the server is bound to a single workspace.
measure_nameNoMeasure name to format in-place in TMDL.
dax_expressionNoOptional DAX string to format (standalone or replacement).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, yet it never mentions that this tool can write files or that the default is a non-mutating dry run with a ChangePlan. That the safe path is the default, and that dry_run=false performs a write with post-write validation, appears only in the schema, not the description. An agent reading the description alone would not know this is a potentially destructive 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?

A single front-loaded sentence with the verb and resource first and zero padding. It is efficient, though the unexplained 'TMDL' abbreviation and the tight packing of two modes into one clause make it slightly cryptic for a five-parameter tool.

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 (ChangePlan) so return values need not be described, and the schema fully documents the parameters. However, for a zero-annotation tool capable of mutating model files, the description omits the write behavior and safety default, leaving a meaningful gap in what an agent needs to call it responsibly.

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 coverage is 100% and every parameter is documented in the schema, so the baseline of 3 applies. The description's 'standalone or in TMDL' framing loosely links dax_expression to the standalone path and measure_name/table to the TMDL path, but that mapping is already spelled out in the schema descriptions, so little meaning is added.

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 (standardize/format) and resource (DAX), plus the two operating modes: standalone expression or in-place in TMDL. That is more than a restatement of the name. It doesn't differentiate itself from the sibling update_measure_dax, which could also touch measure DAX, so it stops short of 5.

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?

'standalone or in TMDL' implies the two usage paths, and by extension which parameters select them, but the guidance is only implied. There is no explicit when-to-use versus update_measure_dax, no stated prerequisites, and no when-not guidance for the in-place TMDL mode.

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