Skip to main content
Glama
kesslerio

Attio MCP Server

by kesslerio

filter-list-entries

Filter CRM list entries by specific attributes like stage or status using conditions such as equals, contains, or greater than to find targeted records.

Instructions

Filter entries in a CRM list by a specific attribute (e.g., stage, status)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attributeSlugYesSlug of the attribute to filter by (e.g., 'stage', 'status')
conditionYesFilter condition (e.g., 'equals', 'contains', 'greater_than')
limitNoMaximum number of entries to fetch (default: 20)
listIdYesID of the list to filter entries from
offsetNoNumber of entries to skip for pagination (default: 0)
valueYesValue to filter by (type depends on the attribute)

Implementation Reference

  • The core handler function for the 'filter-list-entries' tool. Validates parameters, constructs a single-condition filter object, and delegates to getListEntries for execution.
    export async function filterListEntries(
      listId: string,
      attributeSlug: string,
      condition: string,
      value: unknown,
      limit: number = 20,
      offset: number = 0
    ): Promise<AttioListEntry[]> {
      if (!listId || typeof listId !== 'string') {
        throw new Error('Invalid list ID: Must be a non-empty string');
      }
    
      if (!attributeSlug || typeof attributeSlug !== 'string') {
        throw new Error('Invalid attribute slug: Must be a non-empty string');
      }
    
      if (!condition || typeof condition !== 'string') {
        throw new Error('Invalid condition: Must be a non-empty string');
      }
    
      const filters: ListEntryFilters = {
        filters: [
          {
            attribute: { slug: attributeSlug },
            condition,
            value: value as FilterValue,
          },
        ],
        matchAny: false,
      };
    
      return getListEntries(listId, limit, offset, filters);
    }
  • The input schema and description definition for the 'filter-list-entries' tool, including parameters, types, enums, and examples.
    {
      name: 'filter-list-entries',
      description: formatToolDescription({
        capability: 'Filter list entries by single attribute condition.',
        boundaries:
          'combine conditions; use advanced-filter for multi-condition.',
        constraints: 'Requires listId, attributeSlug, condition, value.',
        recoveryHint: 'Use get-list-details for valid attribute slugs.',
      }),
      inputSchema: {
        type: 'object',
        properties: {
          listId: {
            type: 'string',
            description: 'ID of the list to filter entries from',
            example: '550e8400-e29b-41d4-a716-446655440000',
          },
          attributeSlug: {
            type: 'string',
            description:
              "Slug of the attribute to filter by (e.g., 'stage', 'status')",
            example: 'stage',
          },
          condition: {
            type: 'string',
            description:
              "Filter condition (e.g., 'equals', 'contains', 'greater_than')",
            enum: [
              'equals',
              'not_equals',
              'contains',
              'not_contains',
              'starts_with',
              'ends_with',
              'greater_than',
              'less_than',
              'greater_than_or_equals',
              'less_than_or_equals',
              'is_empty',
              'is_not_empty',
              'is_set',
              'is_not_set',
            ],
            example: 'equals',
          },
          value: {
            description: 'Value to filter by (type depends on the attribute)',
            example: 'Qualified',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of entries to fetch (default: 20)',
            example: 50,
          },
          offset: {
            type: 'number',
            description: 'Number of entries to skip for pagination (default: 0)',
            example: 0,
          },
        },
        required: ['listId', 'attributeSlug', 'condition', 'value'],
        additionalProperties: false,
      },
    },
  • The tool configuration registration that maps the 'filter-list-entries' name to its handler function and specifies result formatting.
    filterListEntries: {
      name: 'filter-list-entries',
      handler: filterListEntries,
      formatResult: (results: AttioListEntry[]) => {
        // Return JSON string
        return JSON.stringify(Array.isArray(results) ? results : []);
      },
    } as ToolConfig,
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 the tool filters entries but doesn't mention whether this is a read-only operation, if it affects data, what permissions are required, or how results are returned (e.g., pagination details beyond schema). The description is minimal and lacks crucial behavioral context for a filtering tool.

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 with a relevant example. It's front-loaded with the core functionality and wastes no words. This is appropriately concise for a straightforward filtering 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?

For a filtering tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain the tool's behavior, return format, error conditions, or how it differs from similar tools like 'advanced-filter-list-entries'. The agent lacks context to use this tool effectively beyond basic parameter filling.

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 6 parameters. The description adds no parameter-specific information beyond implying filtering by attribute. It doesn't explain parameter interactions, value types, or provide examples beyond the generic 'e.g., stage, status'. With high schema coverage, the baseline 3 is appropriate.

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 ('filter entries') and resource ('in a CRM list'), with a specific attribute example ('e.g., stage, status'). It distinguishes from siblings like 'get-list-entries' (no filtering) and 'advanced-filter-list-entries' (more complex filtering), but doesn't explicitly name alternatives. This is clear but lacks explicit sibling differentiation.

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 like 'advanced-filter-list-entries' or 'search'. It mentions filtering by a specific attribute but doesn't specify prerequisites, limitations, or when other tools might be more appropriate. This leaves the agent with minimal context for tool selection.

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/kesslerio/attio-mcp-server'

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