Skip to main content
Glama

ado_query_sprint

Query user stories from a specific Azure DevOps sprint to track progress and filter by status for sprint planning and reporting.

Instructions

Consulta User Stories de un sprint específico en Azure DevOps

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iterationPathYesRuta del sprint (ej: 'Proyecto\Sprint1')
stateNoFiltrar por estado (Active, New, Closed, etc.)

Implementation Reference

  • The handler logic for 'ado_query_sprint' which executes a WIQL query against Azure DevOps to fetch user stories based on the iteration path and optional state.
    async ({ iterationPath, state }) => {
      const api = await getWitApi();
      const stateFilter = state ? ` AND [System.State] = '${state}'` : "";
      const wiql: witInterfaces.Wiql = {
        query: `SELECT [System.Id], [System.Title], [System.State], [System.Tags] FROM WorkItems WHERE [System.WorkItemType] = 'User Story'${stateFilter} AND [System.IterationPath] UNDER '${iterationPath}' ORDER BY [System.Id]`,
      };
    
      const teamContext = { project: currentProject };
      const queryResult = await api.queryByWiql(wiql, teamContext);
      const workItemRefs = queryResult.workItems || [];
    
      if (workItemRefs.length === 0) {
        return {
          content: [
            { type: "text", text: "No se encontraron Work Items en este sprint" },
          ],
        };
      }
    
      // Obtener detalles de los Work Items
      const ids = workItemRefs.map((wi) => wi.id!).filter((id): id is number => id !== undefined);
      const workItems = await api.getWorkItems(
        ids,
        ["System.Id", "System.Title", "System.State", "System.Tags"]
      );
    
      const result = workItems
        .map((wi) => {
          const fields = wi.fields || {};
          return `ID: ${wi.id} | ${fields["System.Title"]} | Estado: ${fields["System.State"]} | Tags: ${fields["System.Tags"] || "N/A"}`;
        })
        .join("\n");
    
      return {
        content: [{ type: "text", text: result || "Sin resultados" }],
  • src/index.ts:257-268 (registration)
    Registration of the 'ado_query_sprint' tool using the server.tool method, including schema definition for arguments 'iterationPath' and 'state'.
    server.tool(
      "ado_query_sprint",
      "Consulta User Stories de un sprint específico en Azure DevOps",
      {
        iterationPath: z
          .string()
          .describe("Ruta del sprint (ej: 'Proyecto\\Sprint1')"),
        state: z
          .string()
          .optional()
          .describe("Filtrar por estado (Active, New, Closed, etc.)"),
      },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a query/retrieval operation but doesn't mention important behavioral aspects like whether it returns all fields or specific ones, pagination behavior, authentication requirements, rate limits, or what happens when no stories match the criteria. The description is insufficient for a tool with no annotation coverage.

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 Spanish sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a query tool that likely returns multiple work items, the description is incomplete. It doesn't explain what data is returned, in what format, or any limitations. For a query tool in a development operations context, users need to know what information they'll receive and how it's structured.

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 already documents both parameters well. The description doesn't add any parameter semantics beyond what's in the schema - it doesn't explain the iterationPath format further, provide more state examples, or clarify parameter interactions. This meets the baseline for high schema coverage.

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 action ('Consulta' meaning 'Query' or 'Retrieve') and resource ('User Stories de un sprint específico en Azure DevOps'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'ado_query_wiql' or 'ado_get_work_item', which also retrieve work items, leaving some ambiguity about when to use this specific query tool.

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. It doesn't mention sibling tools like 'ado_query_wiql' (which uses WIQL queries) or 'ado_get_work_item' (which retrieves individual items), nor does it specify prerequisites or appropriate contexts for this sprint-specific query approach.

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

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/soulberto/mcp-azure'

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