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']
      }
    };
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions 'universal search' but doesn't disclose key traits like pagination behavior, rate limits, authentication requirements (implied by parameters), or what happens with large result sets. For an 8-parameter search tool, this is inadequate.

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 highly concise and front-loaded: two sentences with zero waste. The first sentence defines the tool's scope and action, and the second provides usage guidance, making it easy to parse quickly.

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 (8 parameters, search functionality) and lack of annotations and output schema, the description is insufficient. It doesn't explain result formats, error handling, or performance characteristics, leaving gaps for an AI agent to invoke it correctly in varied contexts.

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 fully documents all 8 parameters. The description adds no parameter-specific semantics beyond implying the 'query' parameter is for 'keywords or phrases.' This meets the baseline of 3 since 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 tool's purpose: 'Universal search across all Trello content (boards, cards, members).' It specifies the action (search) and resources (boards, cards, members), though it doesn't explicitly differentiate from sibling tools like 'list_boards' or 'trello_get_user_boards' beyond implying broader search scope.

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

Usage Guidelines3/5

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

The description provides implied usage context with 'Use this to find specific items by keywords or phrases,' suggesting it's for keyword-based discovery. However, it doesn't explicitly state when to use this versus alternatives like 'list_boards' (for unfiltered listing) or 'trello_get_board_cards' (for board-specific retrieval), leaving some ambiguity.

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