Skip to main content
Glama

diagnose_power_query

Checks every table's Power Query load to find refresh errors with their messages and detect stale refreshes where queries were edited after loading, revealing what's broken first.

Instructions

Fast health check across every table's Power Query load: which tables errored on last refresh (with the actual error message), and whether a table was refreshed before or after its query was last edited (a stale refresh). This is the live, authoritative signal for "is something broken" -- check this first, then use list_power_query to read the M code (with its step breakdown) for whichever table shows a problem.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It does well on output shape (error messages, stale-refresh classification) and asserts the result is 'live, authoritative' and 'fast,' but never clarifies whether invoking it triggers an actual refresh/query execution or only inspects cached metadata — a critical side-effect question for a Power Query diagnostic.

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?

Three tight sentences, front-loaded with the core action and output, followed by the routing advice. Every clause — error message detail, stale-refresh definition, authoritative-signal claim — adds decision-relevant information.

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?

An output schema exists, so return values are already covered, and the description does supply the diagnostic semantics well. However, for a single-param tool the undefined 'instance' argument and the unaddressed refresh-vs-read behavior leave real gaps an agent must guess at before invoking.

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?

The single required parameter 'instance' has 0% schema description coverage and is never mentioned in the description. The agent gets no hint about whether it expects a PBIX path, server/workspace name, or connection identifier, so the description leaves the only input entirely undefined.

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 specific verb+resource (health check across every table's Power Query load) and enumerates the two concrete findings it returns: tables that errored on last refresh with the actual error text, and tables whose refresh predates their last query edit. It is clearly separable from neighbors like check_relationship_integrity, find_query_diagnostics, and list_power_query.

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?

Explicitly sequences the workflow: 'check this first' for the broken/not-broken signal, then 'use list_power_query to read the M code ... for whichever table shows a problem.' It names the alternative tool and the condition that selects it, leaving nothing to inference.

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