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);

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