Skip to main content
Glama

ado_get_attachments

Retrieve attachments from Azure DevOps work items by specifying the work item ID to access linked files and documents.

Instructions

Obtiene la lista de adjuntos de un Work Item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID del Work Item

Implementation Reference

  • Handler implementation for 'ado_get_attachments' which fetches work item relations and filters for 'AttachedFile'.
    server.tool(
      "ado_get_attachments",
      "Obtiene la lista de adjuntos de un Work Item",
      {
        id: z.number().describe("ID del Work Item"),
      },
      async ({ id }) => {
        const api = await getWitApi();
    
        const workItem = await api.getWorkItem(
          id,
          undefined,
          undefined,
          witInterfaces.WorkItemExpand.Relations
        );
    
        if (!workItem.relations || workItem.relations.length === 0) {
          return {
            content: [
              {
                type: "text",
                text: `No hay adjuntos en el Work Item #${id}`,
              },
            ],
          };
        }
    
        const attachments = workItem.relations
          .filter((rel) => rel.rel === "AttachedFile")
          .map((rel) => {
            const comment = rel.attributes?.comment || "";
            const name = rel.attributes?.name || "Sin nombre";
            return `- ${name}\n  URL: ${rel.url}\n  Comentario: ${comment || "(sin comentario)"}`;
          });
    
        if (attachments.length === 0) {
          return {
            content: [
              {
                type: "text",
                text: `No hay adjuntos en el Work Item #${id}`,
              },
            ],
          };
        }
    
        return {
          content: [
            {
              type: "text",
              text: `Adjuntos del Work Item #${id}:\n\n${attachments.join("\n\n")}`,
            },
          ],
        };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Obtiene' implies a read operation, it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the attachment list takes. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 sentence that directly states the tool's purpose without any wasted words. It's appropriately sized for a simple retrieval tool and gets straight to the point.

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?

For a tool with no annotations, no output schema, and 1 parameter, the description is insufficient. It doesn't explain what format the attachment list returns, whether it includes metadata, how to handle authentication, or any error conditions. The description alone doesn't provide enough context for reliable tool invocation.

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?

The schema description coverage is 100% (the 'id' parameter is fully documented in the schema), so the baseline is 3. The description doesn't add any parameter semantics beyond what's already in the schema - it mentions the Work Item but doesn't provide additional context about the ID parameter beyond what the schema already states.

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 ('Obtiene' - Gets) and resource ('lista de adjuntos de un Work Item' - list of attachments of a Work Item), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'ado_get_work_item' or 'ado_get_comments', which prevents a perfect score.

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. There's no mention of prerequisites, when-not-to-use scenarios, or comparison with related tools like 'ado_get_work_item' (which might include attachments) or 'ado_upload_attachment' (which adds attachments).

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