Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

wit_my_work_items

Retrieve and manage work items assigned to or created by the authenticated user in Azure DevOps projects, with options to filter by type, limit results, and exclude completed items.

Instructions

Retrieve a list of work items relevent to the authenticated user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeCompletedNoWhether to include completed work items. Defaults to false.
projectYesThe name or ID of the Azure DevOps project.
topNoThe maximum number of work items to return. Defaults to 50.
typeNoThe type of work items to retrieve. Defaults to 'assignedtome'.assignedtome

Implementation Reference

  • The handler function that executes the tool logic: retrieves work items relevant to the authenticated user (assigned to me or my activity) using the Azure DevOps WorkItemTracking API's getPredefinedQueryResults method.
    async ({ project, type, top, includeCompleted }) => { const connection = await connectionProvider(); const workApi = await connection.getWorkApi(); const workItems = await workApi.getPredefinedQueryResults(project, type, top, includeCompleted); return { content: [{ type: "text", text: JSON.stringify(workItems, null, 2) }], }; }
  • Zod schema defining the input parameters for the tool: project, type (assignedtome/myactivity), top (max items), includeCompleted.
    { project: z.string().describe("The name or ID of the Azure DevOps project."), type: z.enum(["assignedtome", "myactivity"]).default("assignedtome").describe("The type of work items to retrieve. Defaults to 'assignedtome'."), top: z.number().default(50).describe("The maximum number of work items to return. Defaults to 50."), includeCompleted: z.boolean().default(false).describe("Whether to include completed work items. Defaults to false."), },
  • Mapping of internal key 'my_work_items' to the tool name 'wit_my_work_items' in the WORKITEM_TOOLS constant, used in server.tool registration.
    my_work_items: "wit_my_work_items",
  • The server.tool call that registers the 'wit_my_work_items' tool within the configureWorkItemTools function.
    server.tool( WORKITEM_TOOLS.my_work_items, "Retrieve a list of work items relevent to the authenticated user.", { project: z.string().describe("The name or ID of the Azure DevOps project."), type: z.enum(["assignedtome", "myactivity"]).default("assignedtome").describe("The type of work items to retrieve. Defaults to 'assignedtome'."), top: z.number().default(50).describe("The maximum number of work items to return. Defaults to 50."), includeCompleted: z.boolean().default(false).describe("Whether to include completed work items. Defaults to false."), }, async ({ project, type, top, includeCompleted }) => { const connection = await connectionProvider(); const workApi = await connection.getWorkApi(); const workItems = await workApi.getPredefinedQueryResults(project, type, top, includeCompleted); return { content: [{ type: "text", text: JSON.stringify(workItems, null, 2) }], }; } );

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