Skip to main content
Glama
dax-query-server

dax-query-server

by wes-stone

search_measures

Read-only

Find measures in a Power BI connection by name, description, or DAX expression with case-insensitive matching and relevance-ranked results for discovery.

Instructions

Search measures for a connection by name, description, or expression.

Performs a case-insensitive substring match on measure names and, when a data dictionary exists, measure descriptions and DAX expressions. Returns a JSON array sorted by relevance: exact match > starts-with > contains. Expressions are truncated to 100 characters.

Required parameters: connection_name, search_term. Optional parameters: connections_dir, max_results (default 20).

Use this when the user asks "which measure calculates revenue?" or similar discovery questions.

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

Input Schema

NameRequiredDescriptionDefault
max_resultsNo
search_termYes
connection_nameYes
connections_dirNoConnections

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.8

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, and the description adds substantial behavior beyond that: case-insensitive substring matching, the conditional scope (descriptions/DAX only when a data dictionary exists), relevance ordering (exact > starts-with > contains), and expression truncation at 100 characters. It does not mention pagination or total-count behavior, but the output schema covers return shape.

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 purpose is front-loaded in the first sentence and the matching mechanics follow in a readable order. The 'Required/Optional parameters' sentence partly duplicates the schema and is the least earned line, though the max_results default is still useful.

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?

An output schema exists, so explaining sorted-array return semantics is a bonus rather than a gap, and the truncation caveat is a genuinely useful add. The only real omission is the meaning of connections_dir, which matters given zero schema description coverage.

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 carry parameter meaning. It labels required vs optional and gives the max_results default, and the matching prose implicitly defines search_term, but connections_dir is merely named with no explanation of what it points at or how it changes the lookup.

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?

States a specific verb and resource ('Search measures for a connection') plus the three searchable fields, which is far more than a restatement of the name. It does not explicitly contrast itself with the nearby get_measure_detail or search_columns siblings, relying instead on the discovery-question example to imply the distinction.

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?

Gives a concrete triggering scenario ('which measure calculates revenue?' or similar discovery questions), which is clear usage context rather than an implied one. It stops short of stating when not to use it or naming an alternative tool for retrieving full measure detail.

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