Skip to main content
Glama

pbi_inspect_table

Read-onlyIdempotent

Inspect one Power BI table to return full column metadata, DAX measures, Power Query M scripts, hierarchies, and relationships. Use it after model-level discovery when exact column, formula, or M code details are needed.

Instructions

Step 4 of discovery (granular single-table inspection). Returns full column metadata (data type, source column, format, folder, sort-by, key/group-by flags, calculated column DAX, hidden flag, usage profile), hosted DAX measures (formatted formulas plus lineage and report usage), complete unclipped Power Query M partition scripts with parsed steps and native SQL, hierarchies, calculation items, and inbound/outbound relationships for one table. Use after pbi_inspect_model when you need exact column definitions, DAX expressions, or full M code. Do NOT use for cross-model keyword search (use pbi_search_dax_and_m) or multi-hop KPI-to-SQL lineage (use pbi_trace_measure_end_to_end).

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": {
      "model": "<model>",
      "table": "<table>"
    },
    "name": "pbi_inspect_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesSemantic model name or dataset GUID.
tableYesTable name (matched exact case-insensitive first, then substring).
workspaceNoOptional workspace name filter to disambiguate identically named models.
column_filterNoFilter returned columns: 'all' (default), 'used', 'unused', 'calculated', or 'hidden'.all
include_m_codeNoInclude complete unclipped Power Query M partition code (default: true).
include_measuresNoInclude hosted DAX measures with formatted formulas and lineage (default: true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=false and destructiveHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: it promises 'complete unclipped' M partition scripts and full metadata rather than summaries, and marks this as a single-table rather than cross-model operation. It stops short of warning about output volume or cost, which for a tool returning unclipped M code and all measures would be genuinely useful.

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 purpose and role in the workflow, then the return inventory, then usage and exclusions — a logical order with no filler sentences. The parenthetical enumeration of returned column attributes is dense and slightly heavy, but every item conveys what the agent will actually receive, so it earns its space.

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?

There is no output schema, so the description carries the burden of describing returns, and it does so thoroughly — column attributes, measures with lineage, parsed M steps with native SQL, hierarchies, calculation items, relationships. Combined with the safety annotations and full schema coverage, an agent has enough to invoke it correctly; only the absence of any note about output size or truncation policy leaves a gap for such a data-heavy call.

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 every parameter including enum values for column_filter is already documented in the schema; baseline is 3. The description only indirectly adds meaning, since 'full column metadata' and 'complete unclipped Power Query M' hint at what the include_m_code and column_filter defaults govern, but it never discusses those switches or the table-name matching behavior.

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?

States a concrete verb and scope — 'Returns full column metadata ... hosted DAX measures ... Power Query M partition scripts ... relationships for one table' — which is unambiguous about the resource and its granularity. It also positions itself in a discovery sequence ('Step 4') and distinguishes itself from sibling tools by name, so an agent can choose it without opening the schema.

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

Usage Guidelines5/5

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

Gives an explicit prerequisite ('Use after pbi_inspect_model when you need exact column definitions, DAX expressions, or full M code') plus two explicit exclusions that route to named alternatives (pbi_search_dax_and_m for keyword search, pbi_trace_measure_end_to_end for multi-hop KPI-to-SQL lineage). Both the when-to-use and when-not-to-use cases are covered.

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