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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID del Work Item | |
| top | No | Nú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 }) => { - src/index.ts:738-775 (handler)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}`, }, ], }; } );