Skip to main content
Glama

Query work items (WIQL)

query_work_items
Read-onlyIdempotent

Run WIQL queries against Azure DevOps projects and return matching work-item IDs.

Instructions

Run a Work Item Query Language (WIQL) query against a project and return the matching work-item ids (fetch fields with get_work_item). Example: SELECT [System.Id] FROM WorkItems WHERE [System.State] = 'Active'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wiqlYesA WIQL query string, e.g. SELECT [System.Id] FROM WorkItems WHERE [System.WorkItemType] = 'Bug'
projectYesProject name or id (must be within AZDO_PROJECT_ALLOWLIST when that is set)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.3
    • addedInput schema / properties / project / description
      Added value: +"Project name or id (must be within AZDO_PROJECT_ALLOWLIST when that is set)"
    • changedInput schema / properties / wiql / description
      Previous value: -"A WIQL query string"New value: +"A WIQL query string, e.g. SELECT [System.Id] FROM WorkItems WHERE [System.WorkItemType] = 'Bug'"
  2. Changed1 schema field changedv0.2.2
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already convey readOnlyHint, idempotent, openWorld, and non-destructive behavior. The description adds useful behavior beyond annotations by specifying that the tool returns IDs only rather than full work-item data, which is helpful for setting expectations and invoking get_work_item afterward.

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?

The description is compact and front-loaded: one clear sentence states what the tool does, then adds a terse but informative WIQL example. Every sentence earns its place, and there is no padding or repetition of annotation content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with rich annotations and a complete input schema, the description covers what the tool returns, the required project context, points to get_work_item for follow-up data, and includes an example query. This is sufficient for an agent to call it correctly.

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%, with both parameters already describing 'wiql' and 'project'. The description's example WIQL syntax adds a useful illustration but does not materially add meaning beyond the schema, so it meets the baseline without exceeding it.

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?

The description uses a specific verb-resource pair ('Run a WIQL query against a project') and states a precise outcome ('return the matching work-item ids'). It also names the natural sibling path via 'fetch fields with get_work_item', distinguishing this from the work-item detail retrieval tool.

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?

The description clearly communicates the query-oriented use case and directs the agent to get_work_item for fetching fields. It does not spell out explicit when-not or exclusions, but the context is strong enough to route the agent to the appropriate alternative.

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