Skip to main content
Glama

Add Measure

add_measure

Adds a DAX measure with an optional format string to a specified table in a Power BI project, enabling calculated metrics for reports.

Instructions

Add a DAX measure to a table of a project. Example: dax='SUM(Sales[NetAmount])', format_string='"$"#,##0.00'.

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": {
      "pbip_path": "<pbip_path>",
      "table_name": "<table_name>",
      "measure_name": "<measure_name>",
      "dax": "<dax>"
    },
    "name": "add_measure"
  }
}

Input Schema

NameRequiredDescriptionDefault
daxYes
pbip_pathYes
table_nameYes
measure_nameYes
format_stringNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/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 burden and does not say whether an existing measure with the same name is overwritten, whether the project file must be opened or closed, what permissions are needed, or whether a write/validation step occurs. The inline DAX example is useful context, but it is syntactic rather than behavioral.

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: purpose first, then a concrete example. Nothing is wasted and the example earns its place by demonstrating two otherwise undescribed parameters.

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

Completeness1/5

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

This is a mutation tool with five parameters at 0% schema coverage and no annotations. The output schema exists, so return values need not be explained, but the description omits duplicate-name behavior, overwrite semantics, path expectations, and preconditions, which is not enough for correct invocation.

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 five parameters, so the description is the only source of parameter meaning. It clarifies the dax expression format and shows the format_string pattern, but leaves pbip_path, table_name, and measure_name entirely undecoded, including no hint about path format or whether measure_name must be unique.

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 verb and resource ('Add a DAX measure to a table of a project'), which is immediately distinguishable from table-creation siblings like add_csv_table or add_date_table. It stops short of naming or contrasting with the closest alternative (e.g., pbix_measures for reading existing measures), so it is clear but not fully differentiated.

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 explicit when-to-use or when-not-to-use guidance and no mention of alternatives such as validate_pbip or pbix_measures. The only usage signal is implicit: the tool targets a project path and table, which an agent must infer from the parameter list.

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