Skip to main content
Glama

ado_get_comments

Retrieve discussion history and comments from Azure DevOps work items to track conversations and decisions.

Instructions

Obtiene los comentarios/historial de discusión de un Work Item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID del Work Item
topNoNúmero máximo de comentarios a obtener (por defecto 10)

Implementation Reference

  • src/index.ts:731-738 (registration)
    Registration of the ado_get_comments tool.
    server.tool(
      "ado_get_comments",
      "Obtiene los comentarios/historial de discusión de un Work Item",
      {
        id: z.number().describe("ID del Work Item"),
        top: z.number().optional().describe("Número máximo de comentarios a obtener (por defecto 10)"),
      },
      async ({ id, top = 10 }) => {
  • Handler function for ado_get_comments tool which fetches comments from Azure DevOps.
      async ({ id, top = 10 }) => {
        const api = await getWitApi();
    
        const comments = await api.getComments(currentProject, id, top);
    
        if (!comments.comments || comments.comments.length === 0) {
          return {
            content: [
              {
                type: "text",
                text: `No hay comentarios en el Work Item #${id}`,
              },
            ],
          };
        }
    
        const result = comments.comments
          .map((comment) => {
            const author = comment.createdBy?.displayName || "Desconocido";
            const date = comment.createdDate
              ? new Date(comment.createdDate).toLocaleString()
              : "Fecha desconocida";
            const text = comment.text || "(sin contenido)";
            return `**${author}** - ${date}\n${text}\n`;
          })
          .join("\n---\n");
    
        return {
          content: [
            {
              type: "text",
              text: `Comentarios del Work Item #${id}:\n\n${result}`,
            },
          ],
        };
      }
    );

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