Skip to main content
Glama
dax-query-server

dax-query-server

by wes-stone

get_connection_context

Read-only

Retrieves metadata and context for a named Power BI connection so you can discover tables, columns, measures, and filters before writing DAX queries.

Instructions

Return metadata and context for a named connection.

This is the PRIMARY way to discover tables, columns, measures, and filters. Always call this FIRST before writing any DAX query.

detail levels:

  • "overview" (default): Returns the compact overview with key tables, measures, and a few example queries. Fast and concise — use this first.

  • "full": Returns the complete context markdown. Only use if overview is insufficient and you need deep detail on filters, column values, etc.

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": "get_connection_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNooverview
connection_nameYes
connections_dirNoConnections

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.8

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries most of the burden and does it well: it discloses that the tool returns context markdown, that overview is compact and fast, and that full is expensive/deep. It does not mention caching, staleness, or how large the full payload can get.

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?

The core rule is front-loaded in the first two lines, and the bulleted detail levels are easy to scan. Minor redundancy between "(default)" and "use this first" for the overview level, but nothing is bloat.

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?

With an output schema present, the description needn't explain return values, and it correctly focuses on workflow ordering and detail-level selection. The one real omission is connections_dir, which an agent with a non-default directory would have to guess at.

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 for all three parameters. It fully documents the detail parameter with its two modes and default behavior, but connection_name is only implied by "named connection" and connections_dir is never mentioned at all.

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?

"Return metadata and context for a named connection" gives a specific verb and resource, and the follow-up sentence scopes what that metadata is (tables, columns, measures, filters). It distinguishes itself as the entry point rather than a lookup tool, though it never explicitly contrasts with siblings such as inspect_connection, get_schema, or search_connection_context.

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?

It states an explicit ordering rule ("Always call this FIRST before writing any DAX query") and gives a clear escalation path: start with overview, move to full only if overview is insufficient. That is when-to-use, when-to-escalate, and an implied cost tradeoff in one place.

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