Skip to main content
Glama
stefanskiasan

Azure DevOps MCP Server for Cline

list_work_items

Retrieve work items from Azure DevOps boards using WIQL queries to filter and organize tasks, bugs, and features for project tracking.

Instructions

List work items from a board

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesWIQL query to filter work items

Implementation Reference

  • The core handler function that executes a WIQL query against the Azure DevOps Work Item Tracking API and formats the result as MCP content.
    export async function listWorkItems(args: Wiql, config: AzureDevOpsConfig) { if (!args.query) { throw new McpError(ErrorCode.InvalidParams, 'Invalid WIQL query'); } AzureDevOpsConnection.initialize(config); const connection = AzureDevOpsConnection.getInstance(); const workItemTrackingApi = await connection.getWorkItemTrackingApi(); const queryResult = await workItemTrackingApi.queryByWiql( args, { project: config.project } ); return { content: [ { type: 'text', text: JSON.stringify(queryResult, null, 2), }, ], }; }
  • Input schema for the list_work_items tool, requiring a 'query' string parameter for the WIQL query.
    inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'WIQL query to filter work items', }, }, required: ['query'], },
  • Registration of the list_work_items tool in the definitions array, including name, description, and schema.
    { name: 'list_work_items', description: 'List work items from a board', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'WIQL query to filter work items', }, }, required: ['query'], }, },
  • src/index.ts:129-131 (registration)
    Main server dispatch case that calls the listWorkItems tool handler upon invocation.
    case 'list_work_items': result = await tools.workItem.listWorkItems(request.params.arguments); break;
  • Wrapper registration that binds the listWorkItems handler to the tool instance with config.
    listWorkItems: (args: Wiql) => listWorkItems(args, config),

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/stefanskiasan/azure-devops-mcp-server'

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