Skip to main content
Glama
cristip73

MCP Server for Asana

by cristip73

asana_get_attachments_for_object

Retrieve file attachments linked to tasks, projects, or other objects in Asana to access supporting documents and resources.

Instructions

List attachments for an object (task, project, etc)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_gidYesThe object GID to get attachments for
limitNoResults per page (1-100)
offsetNoPagination offset token
opt_fieldsNoComma-separated list of optional fields to include

Implementation Reference

  • The primary MCP tool handler switch case that destructures input parameters and delegates execution to the AsanaClientWrapper's getAttachmentsForObject method, returning the JSON-stringified response.
    case "asana_get_attachments_for_object": {
      const { object_gid, ...opts } = args;
      const response = await asanaClient.getAttachmentsForObject(object_gid, opts);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Core implementation in AsanaClientWrapper that calls the Asana SDK's AttachmentsApi.getAttachmentsForObject to fetch attachments for the given object GID.
    async getAttachmentsForObject(objectId: string, opts: any = {}) {
      const response = await this.attachments.getAttachmentsForObject(objectId, opts);
      return response.data;
    }
  • MCP Tool definition including name, description, and input schema specifying required object_gid and optional pagination/fields parameters.
    export const getAttachmentsForObjectTool: Tool = {
      name: "asana_get_attachments_for_object",
      description: "List attachments for an object (task, project, etc)",
      inputSchema: {
        type: "object",
        properties: {
          object_gid: {
            type: "string",
            description: "The object GID to get attachments for"
          },
          limit: {
            type: "number",
            description: "Results per page (1-100)",
            minimum: 1,
            maximum: 100
          },
          offset: {
            type: "string",
            description: "Pagination offset token"
          },
          opt_fields: {
            type: "string",
            description: "Comma-separated list of optional fields to include"
          }
        },
        required: ["object_gid"]
      }
    };
  • Registration of the tool in the main tools array exported for MCP server, alongside related attachment tools.
    getUsersForWorkspaceTool,
    getAttachmentsForObjectTool,
    uploadAttachmentForObjectTool,
    downloadAttachmentTool
  • Input parameter validation ensuring object_gid is a valid Asana GID before tool execution.
    case 'asana_get_attachments_for_object':
      result = validateGid(params.object_gid, 'object_gid');
      if (!result.valid) errors.push(...result.errors);
      break;
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. It states this is a list operation, implying read-only behavior, but doesn't cover pagination details (beyond what the schema shows), rate limits, authentication needs, or what the output looks like. This is a significant gap for a tool with 4 parameters and no output schema.

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 with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple list tool.

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 the tool's complexity (4 parameters, no output schema, no annotations), the description is incomplete. It lacks behavioral context, usage guidelines, and output details, making it inadequate for an agent to fully understand how to invoke and interpret results correctly.

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 all parameters thoroughly. The description adds no additional meaning beyond implying the object can be a task or project, which is minimal value over the schema's 'object GID' description. Baseline 3 is appropriate when the schema does the 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 ('List') and resource ('attachments for an object'), specifying it works for tasks, projects, etc. However, it doesn't explicitly differentiate from the sibling 'asana_upload_attachment_for_object', which handles uploads rather than listing.

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. The description doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name alone.

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/cristip73/mcp-server-asana'

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