Skip to main content
Glama

trello_get_card_attachments

Retrieve all file and link attachments from a specific Trello card to access supporting documents and resources.

Instructions

Get all attachments (files, links) for a specific Trello card.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyYesTrello API key (automatically provided by Claude.app from your stored credentials)
tokenYesTrello API token (automatically provided by Claude.app from your stored credentials)
cardIdYesID of the card to get attachments for
fieldsNoOptional: specific fields to include (e.g., ["name", "url", "mimeType", "date"])

Implementation Reference

  • Handler implementation for 'trello_get_card_attachments' that validates input, fetches attachments via TrelloClient, and formats the response.
    export async function handleTrelloGetCardAttachments(args: unknown) {
      try {
        const { apiKey, token, cardId, fields } = validateGetCardAttachments(args);
        const client = new TrelloClient({ apiKey, token });
        
        const response = await client.getCardAttachments(cardId, {
          ...(fields && { fields })
        });
        const attachments = response.data;
        
        const result = {
          summary: `Found ${attachments.length} attachment(s) for card`,
          cardId,
          attachments: attachments.map(attachment => ({
            id: attachment.id,
            name: attachment.name,
            url: attachment.url,
            mimeType: attachment.mimeType,
            date: attachment.date,
            bytes: attachment.bytes,
            isUpload: attachment.isUpload,
            previews: attachment.previews?.map((preview: any) => ({
              id: preview.id,
              width: preview.width,
              height: preview.height,
              url: preview.url
            })) || []
          })),
          rateLimit: response.rateLimit
        };
        
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      } catch (error) {
        const errorMessage = error instanceof z.ZodError 
          ? formatValidationError(error)
          : error instanceof Error 
            ? error.message 
            : 'Unknown error occurred';
            
        return {
          content: [
            {
              type: 'text' as const,
              text: `Error getting card attachments: ${errorMessage}`
            }
          ],
          isError: true
        };
  • Definition and input schema for the 'trello_get_card_attachments' tool.
    export const trelloGetCardAttachmentsTool: Tool = {
      name: 'trello_get_card_attachments',
      description: 'Get all attachments (files, links) for a specific Trello card.',
      inputSchema: {
        type: 'object',
        properties: {
          apiKey: {
            type: 'string',
            description: 'Trello API key (automatically provided by Claude.app from your stored credentials)'
          },
          token: {
            type: 'string',
            description: 'Trello API token (automatically provided by Claude.app from your stored credentials)'
          },
          cardId: {
            type: 'string',
            description: 'ID of the card to get attachments for',
            pattern: '^[a-f0-9]{24}$'
          },
          fields: {
            type: 'array',
            items: { type: 'string' },
            description: 'Optional: specific fields to include (e.g., ["name", "url", "mimeType", "date"])'
          }
        },
        required: ['apiKey', 'token', 'cardId']
      }
    };
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. While 'Get' implies a read-only operation, it doesn't specify authentication requirements (though schema shows apiKey/token), rate limits, pagination behavior, error conditions, or what happens when no attachments exist. 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 with zero waste. It's front-loaded with the core purpose and includes clarifying parenthetical examples ('files, links'). Every word earns its place in this compact formulation.

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

Completeness3/5

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

For a read-only retrieval tool with good schema coverage but no output schema, the description is minimally adequate. It states what the tool does but lacks important context about return format, error handling, and differentiation from sibling tools. The absence of annotations and output schema means the description should do more to compensate.

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%, providing solid documentation for all parameters. The description adds no parameter-specific information beyond what's in the schema. The baseline of 3 is appropriate when the schema does the heavy lifting, though the description could have explained the 'fields' parameter's purpose more clearly.

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 ('Get') and resource ('attachments for a specific Trello card'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'trello_get_card_actions' or 'trello_get_card_checklists' which also retrieve card-related data, so it doesn't reach the highest 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. With siblings like 'get_card' (which might include attachments) and 'trello_get_card_actions/checklists' (similar retrieval patterns), there's no indication of when this specific attachment-focused tool is preferred or necessary.

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/kocakli/Trello-Desktop-MCP'

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