Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

wit_get_query_results_by_id

Retrieve work item query results by query ID in Azure DevOps. Specify project, team, and limit results, ensuring precise data extraction for efficient DevOps operations.

Instructions

Retrieve the results of a work item query given the query ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the query to retrieve results for.
projectNoThe name or ID of the Azure DevOps project. If not provided, the default project will be used.
teamNoThe name or ID of the Azure DevOps team. If not provided, the default team will be used.
timePrecisionNoWhether to include time precision in the results. Defaults to false.
topNoThe maximum number of results to return. Defaults to 50.

Implementation Reference

  • Handler function that retrieves query results by ID using the Azure DevOps WorkItemTrackingApi.queryById method.
    async ({ id, project, team, timePrecision, top }) => {
      const connection = await connectionProvider();
      const workItemApi = await connection.getWorkItemTrackingApi();
      const teamContext = { project, team };
      const queryResult = await workItemApi.queryById(id, teamContext, timePrecision, top);
    
      return {
        content: [{ type: "text", text: JSON.stringify(queryResult, null, 2) }],
      };
    }
  • Zod input schema defining parameters for the wit_get_query_results_by_id tool.
    {
      id: z.string().describe("The ID of the query to retrieve results for."),
      project: z.string().optional().describe("The name or ID of the Azure DevOps project. If not provided, the default project will be used."),
      team: z.string().optional().describe("The name or ID of the Azure DevOps team. If not provided, the default team will be used."),
      timePrecision: z.boolean().optional().describe("Whether to include time precision in the results. Defaults to false."),
      top: z.number().default(50).describe("The maximum number of results to return. Defaults to 50."),
    },
  • Mapping from internal name 'get_query_results_by_id' to tool name 'wit_get_query_results_by_id' in WORKITEM_TOOLS constant.
    get_query_results_by_id: "wit_get_query_results_by_id",
  • Registration of the tool using McpServer.tool() call inside configureWorkItemTools.
    server.tool(
      WORKITEM_TOOLS.get_query_results_by_id,
  • src/tools.ts:24-24 (registration)
    Top-level call to configureWorkItemTools which registers the wit_get_query_results_by_id tool among others.
    configureWorkItemTools(server, tokenProvider, connectionProvider, userAgentProvider);
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic operation. It doesn't disclose whether this is a read-only operation (likely, but not stated), whether it requires specific permissions, rate limits, pagination behavior (though 'top' parameter suggests pagination), or what format the results come in. For a tool with 5 parameters and no annotation coverage, this is insufficient behavioral context.

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 a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a straightforward retrieval tool and front-loads the core purpose immediately.

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?

For a retrieval tool with 5 parameters and 100% schema coverage but no annotations and no output schema, the description is minimally adequate. It states what the tool does but leaves significant gaps: no behavioral context, no usage guidance, and no information about return format. The agent would need to rely heavily on the schema and possibly trial-and-error.

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%, so all parameters are documented in the schema. The description doesn't add any parameter semantics beyond what's already in the schema - it doesn't explain relationships between parameters (like how project/team interact) or provide examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 clearly states the verb ('Retrieve') and resource ('results of a work item query'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'wit_get_query' (which might retrieve query definition rather than results) or 'wit_get_work_items_batch_by_ids' (which retrieves work items directly rather than query results).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (like needing an existing query ID), comparison to similar tools (like 'wit_get_query' or 'wit_get_work_items_batch_by_ids'), or typical use cases. The agent must infer usage from the tool name alone.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ennuiii/DevOpsMcpPAT'

If you have feedback or need assistance with the MCP directory API, please join our Discord server