Skip to main content
Glama

pbi_generate_dax_context_prompt

Generate a compact markdown snapshot of your Power BI model—tables, columns, measures, relationships—to give an LLM full schema context for authoring DAX in one round-trip.

Instructions

Render a compact markdown snapshot of the model — tables, columns, measures, relationships — ready to paste into an LLM system prompt so the LLM can author DAX with full schema context in one round-trip.

Sections:

  • # Model: <name>

  • one ## <Table> per table with Columns: and (optionally) DAX Measures: lines

  • ## Relationships with A[X] → B[Y] (cardinality, active) rows

Output is truncated to max_chars (default 12 000) with a trailing note when truncation kicks in. Set include_dax=False to omit the measure expressions and stay terse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_charsNo
include_daxNo
include_hiddenNo
include_relationshipsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses truncation behavior ('Output is truncated to max_chars... with a trailing note'), the ability to omit measure expressions via include_dax, and the format sections. It does not mention whether it is read-only or other side effects, but the tool is clearly non-destructive.

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?

The description is compact and well-structured with a clear opening sentence followed by bulleted sections for the output format. Every sentence adds value; no fluff.

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?

Given 4 parameters with 0% schema coverage and complexity, the description fails to mention two parameters (include_hidden, include_relationships). It also does not specify prerequisites like needing an active model connection. While output schema exists, the description should cover all parameters to be fully self-contained.

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 0%, so description must compensate. It explains max_chars (default 12000, truncation note) and include_dax (omit measures) but omits include_hidden and include_relationships. Only half of the parameters are described, leaving ambiguity about the effect of the others.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool renders a compact markdown snapshot of the model (tables, columns, measures, relationships) for use in LLM prompts to author DAX. It uses specific verbs ('Render', 'paste') and identifies the resource ('model snapshot'), distinguishing it from sibling tools like pbi_export_model or pbi_list_tables which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description explicitly says the snapshot is 'ready to paste into an LLM system prompt so the LLM can author DAX with full schema context in one round-trip,' clearly defining when to use this tool. It does not explicitly state when not to use or mention alternatives, but the use case is well-defined.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/imnotStealthy/powerbi-mcp-local'

If you have feedback or need assistance with the MCP directory API, please join our Discord server