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) }],
        };
      }
    );
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 it 'retrieves a list', implying a read-only operation without disclosing behavioral traits like authentication requirements (though hinted by 'authenticated user'), rate limits, pagination (top parameter suggests limited returns), or what 'relevent' entails (e.g., based on assignment or activity). It misses details on error handling or response format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that front-loads the core purpose. It's appropriately sized with no wasted words, though minor spelling error ('relevent') slightly detracts. Efficient for a simple retrieval tool.

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?

Given 4 parameters with full schema coverage, no output schema, and no annotations, the description is minimally adequate. It covers the basic purpose but lacks context on usage scenarios, behavioral details (e.g., authentication, limits), or output expectations. For a user-specific query tool, more guidance on relevance and alternatives would improve completeness.

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 the schema fully documents parameters (includeCompleted, project, top, type) with descriptions and defaults. The description adds no parameter-specific semantics beyond implying user-relevance, which aligns with the 'type' parameter's enum ('assignedtome', 'myactivity'). Baseline 3 is appropriate as schema does 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 ('list of work items'), specifying they are 'relevant to the authenticated user'. It distinguishes from general work item tools like 'wit_get_work_item' or 'wit_get_work_items_batch_by_ids' by focusing on user-relevance, but doesn't explicitly differentiate from sibling 'wit_list_backlog_work_items' or 'wit_get_work_items_for_iteration' which might also retrieve user-specific items.

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?

No guidance is provided on when to use this tool versus alternatives like 'search_workitem', 'wit_get_query_results_by_id', or other wit_* siblings. The description implies it's for authenticated user's items, but doesn't specify contexts (e.g., personal dashboard vs. project overview) or exclusions (e.g., not for historical analysis).

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