Skip to main content
Glama

dax_upsert_measure

Create or update a DAX measure in a table's .tmdl file while preserving existing lineageTag, columns, and partitions.

Instructions

Create or update a DAX measure inside a table's .tmdl file (preserves existing lineageTag, columns, and partitions).

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": {
      "projectPath": "<projectPath>",
      "tableName": "<tableName>",
      "measureName": "<measureName>",
      "expression": "<expression>"
    },
    "name": "dax_upsert_measure"
  }
}

Input Schema

NameRequiredDescriptionDefault
isHiddenNoHide measure in report view
tableNameYesHost table name (e.g. Sales or _Measures)
expressionYesDAX formula (single-line or multi-line)
descriptionNoMeasure description (written as TMDL /// doc comments)
measureNameYesDAX measure name
projectPathYesPath to the .pbip file or project root folder
formatStringNoFormat string (e.g. €#,0.00, 0.0%, #,0)
displayFolderNoDisplay folder path (e.g. KPIs\Revenue)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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, and it does disclose a valuable trait: existing lineageTag, columns, and partitions are preserved. It does not say what happens to an existing measure's other properties on update (expression vs. description vs. formatString overwrite), whether the change is reversible, or what the call returns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler, and the preservation caveat sits in a parenthetical where it does not obscure the main verb. Nothing to cut.

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?

For an 8-parameter mutation tool with no annotations and no output schema, the description covers intent and one important side effect but omits failure modes, overwrite semantics on update, and any indication of what is returned. Adequate, not 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 coverage is 100% with per-parameter descriptions including examples for formatString and displayFolder, so the schema already does the work. The description adds nothing about parameter behavior; baseline 3 applies.

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?

Specific verb-and-resource statement: 'Create or update a DAX measure inside a table's .tmdl file', with the parenthetical narrowing what it operates on. The upsert verb cleanly separates it from the delete/list siblings, 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 Guidelines3/5

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

Usage is only implied by the 'create or update' phrasing; there is no statement of when to prefer this over other write tools, nor prerequisites such as an existing project or table. An agent can infer the use case but gets no explicit routing or exclusion guidance.

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