Skip to main content
Glama
dax-query-server

dax-query-server

by wes-stone

generate_data_dictionary

Generate a YAML data dictionary by inspecting live Power BI semantic model schemas to discover tables, columns, measures, and relationships, with optional file output.

Instructions

Generate a data dictionary YAML from live schema inspection.

Queries MDSCHEMA_MEASUREGROUPS, MDSCHEMA_MEASURES, MDSCHEMA_DIMENSIONS, and MDSCHEMA_LEVELS to discover tables, columns, and measures, then builds a DataDictionary scaffold. If optional TMSCHEMA rowsets are available, it also includes high-confidence relationship metadata.

Required parameters: connection_name. Optional parameters: connections_dir, output_path — when provided the YAML is written to disk.

Returns JSON with yaml_content, table_count, measure_count, and file_path (when output_path is given).

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

Input Schema

NameRequiredDescriptionDefault
output_pathNo
connection_nameYes
connections_dirNoConnections

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.8

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 does well on mechanism: it names the MDSCHEMA rowsets queried, the optional TMSCHEMA fallback, and the side effect of writing YAML when output_path is supplied. It omits material behavior for a write-capable tool — whether an existing file at output_path is overwritten, what happens if connection_name is unknown, and whether the live queries are slow or permission-gated.

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 core action, then mechanism, then parameters, then output — a sensible order with no filler. The trailing 'Returns JSON with yaml_content, ...' partially duplicates the output schema and could be trimmed.

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

Completeness4/5

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

Complexity is moderate and the description covers source data, optional enhancement path, side effects, and required/optional parameters, while the output schema handles return values. The remaining gap is failure and overwrite semantics for the on-disk write path.

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 0%, so the description must compensate, and it partly does: it labels connection_name as required and explains output_path's conditional effect (YAML written to disk only when provided). It never explains what connections_dir ('Connections' default) points at or how a connection_name is obtained, leaving the highest-risk parameter semantics thin.

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 opening sentence gives a specific verb+resource ('Generate a data dictionary YAML') plus its source ('live schema inspection'), which distinguishes it in spirit from get/diff/merge siblings. It stops short of naming any sibling, so the differentiation is inferred from the verb rather than stated.

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 implied: you call this when you need a fresh dictionary built from a live connection. There is no explicit when-to-use/when-not guidance and no mention of how this relates to get_data_dictionary, diff_data_dictionary, or merge_data_dictionary, which an agent would need to choose correctly.

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