Skip to main content
Glama

generate_measure_docs

Generate and write TMDL documentation docstrings for Power BI measures, with optional custom text and a dry-run preview before modifying files.

Instructions

Generate and write a /// TMDL documentation docstring for a measure.

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": {
      "measure_name": "<measure_name>"
    },
    "name": "generate_measure_docs"
  }
}

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.
descriptionNoOptional custom description; auto-generated from DAX if omitted.
measure_nameYesMeasure name to document in TMDL.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses almost nothing: not that the default is a non-mutating dry run, not that setting dry_run=false triggers post-write validation, and not what happens to an existing docstring (overwrite vs merge). "Write" implies mutation without clarifying that the out-of-the-box behavior is read-only.

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 zero filler, which is efficient. For a five-parameter mutating tool, though, the terseness crosses into under-specification rather than disciplined concision.

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 the tool is a file-mutating operation with no annotations and a dry_run flag defaulting to true — the single most important fact for correct invocation — and the description never mentions it. Relative to that complexity, one sentence is not enough.

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 100%, so the baseline is 3; every parameter including dry_run, workspace, table, and description is documented in the schema. The description adds no meaning beyond it — it only implies that measure_name identifies the target and that the docstring is derived from DAX when description is omitted, which the schema already states.

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 names a specific verb pair ("Generate and write") and a specific resource (a /// TMDL documentation docstring for a measure), so an agent can tell it apart from siblings like rename_measure or update_measure_dax. It does not explicitly name an alternative, so it stops short of a 5.

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 when-to-use guidance, no statement of prerequisites, and no routing to alternatives such as format_dax or update_measure_dax. The most consequential usage fact — that dry_run defaults to true, so the default call does not actually write — is left entirely to the schema.

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