Skip to main content
Glama

query_wiql

Read-only

Run read-only WIQL queries to search Azure DevOps work items for criteria other tools cannot express, returning concise work item summaries.

Instructions

Run a read-only WIQL query (SELECT ... FROM WorkItems / WorkItemLinks ...) for searches the other tools cannot express. Returns work item summaries.

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": {
      "wiql": "<wiql>"
    },
    "name": "query_wiql"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNo
wiqlYes
projectNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the agent knows the safety profile; "read-only" largely restates that. The description does add that output is "work item summaries" and that this is a general WIQL escape hatch, but it says nothing about the default result cap (top=200), pagination, or any query cost limits, which matter for a query tool.

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?

Two sentences, front-loaded with the action and followed by the disambiguation clause, with no filler. The phrase "read-only" slightly duplicates the annotation, but overall it is tight and well ordered.

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 need not be described, and the annotations cover safety. However, for a query-construction tool with completely undocumented parameters and a hidden result cap, the description leaves the agent without enough to call it correctly on the first try.

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?

Schema description coverage is 0% across three parameters, so the description must carry the burden and does not: it never explains the wiql string's accepted shape beyond a hint of SELECT/FROM, nor what project scopes, nor what top controls or that it defaults to 200. Only the query parameter is indirectly implied.

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?

The description gives a specific verb and resource ("Run a read-only WIQL query") and even the query shape (SELECT ... FROM WorkItems / WorkItemLinks), plus the output (work item summaries). It distinguishes itself from siblings only indirectly via "searches the other tools cannot express" rather than naming search_work_items, so it stops short of a 5.

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?

"for searches the other tools cannot express" is an explicit routing rule that tells the agent to prefer the simpler search tools first and reach for this one only for complex queries. There is no explicit when-not or a named alternative, so it's clear context without full exclusions.

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