Skip to main content
Glama

trello_search

Search across Trello boards, cards, and members to find specific content using keywords or phrases. Filter results by content type and board IDs for targeted discovery.

Instructions

Universal search across all Trello content (boards, cards, members). Use this to find specific items by keywords or phrases.

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)
queryYesSearch term or phrase to find in Trello content
modelTypesNoTypes of content to search in. Defaults to all types if not specified
boardIdsNoOptional: limit search to specific boards by their IDs
boardsLimitNoMaximum number of boards to return in results
cardsLimitNoMaximum number of cards to return in results
membersLimitNoMaximum number of members to return in results

Implementation Reference

  • The handler function that executes the Trello search tool, validates input, calls the Trello client, and formats the result.
    export async function handleTrelloSearch(args: unknown) {
      try {
        const { apiKey, token, query, modelTypes, boardIds, boardsLimit, cardsLimit, membersLimit } = validateSearch(args);
        const client = new TrelloClient({ apiKey, token });
        
        const searchOptions = {
          ...(modelTypes && { modelTypes }),
          ...(boardIds && { boardIds }),
          ...(boardsLimit !== undefined && { boardsLimit }),
          ...(cardsLimit !== undefined && { cardsLimit }),
          ...(membersLimit !== undefined && { membersLimit })
        };
        
        const response = await client.search(query, Object.keys(searchOptions).length > 0 ? searchOptions : undefined);
        const searchResults = response.data;
        
        const result = {
          summary: `Search results for: "${query}"`,
          query,
          boards: searchResults.boards?.map((board: any) => ({
            id: board.id,
            name: board.name,
            description: board.desc || 'No description',
            url: board.shortUrl,
            closed: board.closed,
            lastActivity: board.dateLastActivity
          })) || [],
          cards: searchResults.cards?.map((card: any) => ({
            id: card.id,
            name: card.name,
            description: card.desc || 'No description',
            url: card.shortUrl,
            listId: card.idList,
            boardId: card.idBoard,
            due: card.due,
            closed: card.closed,
            labels: card.labels?.map((label: any) => ({
              id: label.id,
              name: label.name,
              color: label.color
            })) || []
          })) || [],
          members: searchResults.members?.map((member: any) => ({
            id: member.id,
            fullName: member.fullName,
            username: member.username,
            bio: member.bio,
            url: member.url
          })) || [],
          organizations: searchResults.organizations?.map((org: any) => ({
            id: org.id,
            name: org.name,
            displayName: org.displayName,
            description: org.desc,
            url: org.url
          })) || [],
          totalResults: {
            boards: searchResults.boards?.length || 0,
            cards: searchResults.cards?.length || 0,
            members: searchResults.members?.length || 0,
            organizations: searchResults.organizations?.length || 0
          },
          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 searching Trello: ${errorMessage}`
            }
          ],
          isError: true
        };
      }
    }
  • The MCP tool registration and schema definition for the trello_search tool.
    export const trelloSearchTool: Tool = {
      name: 'trello_search',
      description: 'Universal search across all Trello content (boards, cards, members). Use this to find specific items by keywords or phrases.',
      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)'
          },
          query: {
            type: 'string',
            description: 'Search term or phrase to find in Trello content',
            minLength: 1
          },
          modelTypes: {
            type: 'array',
            items: {
              type: 'string',
              enum: ['boards', 'cards', 'members', 'organizations']
            },
            description: 'Types of content to search in. Defaults to all types if not specified',
            default: ['boards', 'cards', 'members']
          },
          boardIds: {
            type: 'array',
            items: {
              type: 'string',
              pattern: '^[a-f0-9]{24}$'
            },
            description: 'Optional: limit search to specific boards by their IDs'
          },
          boardsLimit: {
            type: 'number',
            minimum: 1,
            maximum: 1000,
            description: 'Maximum number of boards to return in results',
            default: 10
          },
          cardsLimit: {
            type: 'number',
            minimum: 1,
            maximum: 1000,
            description: 'Maximum number of cards to return in results',
            default: 50
          },
          membersLimit: {
            type: 'number',
            minimum: 1,
            maximum: 1000,
            description: 'Maximum number of members to return in results',
            default: 20
          }
        },
        required: ['apiKey', 'token', 'query']
      }
    };

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior2/5

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

With no annotations, the description should disclose behavioral traits like result format, pagination, or read-only nature. It only states the search scope and does not explain what the response contains or how the search behaves, leaving a significant transparency gap.

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 exactly two sentences, front-loaded with the core purpose ('Universal search'), and contains no extraneous detail. Every word earns its place.

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 8 parameters, no output schema, and no annotations, the description is under-specified. It fails to mention what the response looks like, how limits apply, or how filters like boardIds and modelTypes affect results, making it insufficient for an agent to fully anticipate the tool's behavior.

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 input schema has 100% description coverage, so the baseline is 3. The description adds minimal value beyond the schema, only reinforcing that the query parameter is a search term. It does not clarify limit or filter parameters, but the schema already documents them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it is a universal search across all Trello content (boards, cards, members), using the specific verb 'search' and defining the resource scope. This distinguishes it from sibling tools that fetch or modify specific entities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description says 'Use this to find specific items by keywords or phrases,' which provides clear context for when to invoke the tool. It does not explicitly name alternatives or exclusions, but the intent to search rather than directly access known resources is evident.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.