Skip to main content
Glama
kesslerio

Attio MCP Server

by kesslerio

update-list-entry

Modify list entry attributes in Attio CRM, such as updating pipeline stages from 'Interested' to 'Demo Scheduling' or changing other entry properties.

Instructions

Update a list entry (e.g., change stage from 'Interested' to 'Demo Scheduling')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attributesYesAttributes to update on the list entry
entryIdYesID of the list entry to update
listIdYesID of the list containing the entry

Implementation Reference

  • Core handler function that performs the PATCH request to the Attio API to update list entry attributes via /lists/{listId}/entries/{entryId} with entry_values payload.
    export async function updateListEntry(
      listId: string,
      entryId: string,
      attributes: Record<string, unknown>,
      retryConfig?: Partial<RetryConfig>
    ): Promise<AttioListEntry> {
      const api = getLazyAttioClient();
      const path = `/lists/${listId}/entries/${entryId}`;
    
      // Input validation
      if (!listId || typeof listId !== 'string') {
        throw new Error('Invalid list ID: Must be a non-empty string');
      }
    
      if (!entryId || typeof entryId !== 'string') {
        throw new Error('Invalid entry ID: Must be a non-empty string');
      }
    
      if (
        !attributes ||
        typeof attributes !== 'object' ||
        Array.isArray(attributes)
      ) {
        throw new Error('Invalid attributes: Must be a non-empty object');
      }
    
      return callWithRetry(async () => {
        const log = createScopedLogger('lists.operations', 'updateListEntry');
        try {
          if (process.env.NODE_ENV === 'development') {
            log.info('Updating list entry', { path, listId, entryId, attributes });
          }
    
          // Attio API expects updates to list entries in the 'data.entry_values' structure
          // This is specific to list entries, different from record updates in crud.ts
          const response = await api.patch<AttioSingleResponse<AttioListEntry>>(
            path,
            {
              data: {
                entry_values: attributes,
              },
            }
          );
    
          if (process.env.NODE_ENV === 'development') {
            log.info('Update list entry success', { data: response.data });
          }
    
          return response?.data?.data || response?.data;
        } catch (error: unknown) {
          const updateError = error as ListErrorResponse;
          // Enhanced error logging with specific error types
          if (process.env.NODE_ENV === 'development') {
            log.warn('Update list entry error', {
              message: updateError.message || 'Unknown error',
              status: updateError.response?.status,
              data: updateError.response?.data || {},
            });
          }
    
          // Add more specific error types based on status codes
          if (updateError.response?.status === 404) {
            throw new Error(`List entry ${entryId} not found in list ${listId}`);
          } else if (updateError.response?.status === 400) {
            throw new Error(
              `Invalid attributes for list entry update: ${
                updateError.response?.data?.message || 'Bad request'
              }`
            );
          } else if (updateError.response?.status === 403) {
            throw new Error(
              `Insufficient permissions to update list entry ${entryId} in list ${listId}`
            );
          }
    
          // Let upstream handlers create specific, rich error objects.
          throw error;
        }
      }, retryConfig);
    }
  • Tool configuration registration mapping 'update-list-entry' name to the updateListEntry handler function with result formatting.
    updateListEntry: {
      name: 'update-list-entry',
      handler: updateListEntry,
      formatResult: (result: AttioListEntry) => {
        // Return JSON string
        return JSON.stringify(result);
      },
    } as ToolConfig,
  • Tool definition including description, input schema with required listId, entryId, attributes, and approval requirement.
    {
      name: 'update-list-entry',
      description: formatToolDescription({
        capability:
          'Update list entry attributes (stage, status, custom fields).',
        boundaries: 'update record attributes; use update-record for that.',
        requiresApproval: true,
        constraints: 'Requires list UUID, entry UUID, attributes object.',
        recoveryHint: 'Use get-list-details for valid attributes and values.',
      }),
      inputSchema: {
        type: 'object',
        properties: {
          listId: {
            type: 'string',
            description: 'UUID of the list containing the entry',
            example: '550e8400-e29b-41d4-a716-446655440000',
          },
          entryId: {
            type: 'string',
            description: 'UUID of the list entry to update',
            example: '770e8400-e29b-41d4-a716-446655440002',
          },
          attributes: {
            type: 'object',
            description: 'Attributes to update on the list entry',
            properties: {
              stage: {
                type: 'string',
                description:
                  "New stage value (e.g., 'Demo Scheduling', 'Interested', 'Won')",
                example: 'Demo Scheduling',
              },
            },
            additionalProperties: true,
          },
        },
        required: ['listId', 'entryId', 'attributes'],
        additionalProperties: false,
      },
    },
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. It states this is an update operation (implying mutation) but doesn't disclose permission requirements, whether changes are reversible, what happens to unspecified attributes, error conditions, or response format. The example adds some context about stage values but doesn't cover behavioral traits adequately for a mutation 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 immediately conveys the core purpose with a helpful parenthetical example. Every word earns its place with zero redundancy or unnecessary elaboration, making it easy to parse while providing concrete context.

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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't cover behavioral aspects like permissions, side effects, or response format, nor does it explain how this tool relates to sibling operations. The high schema coverage helps with parameters, but overall completeness is poor given the tool's complexity and lack of structured metadata.

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 good documentation for all three parameters. The description adds minimal value beyond the schema: it mentions stage changes as an example, which aligns with the 'stage' property in the schema but doesn't explain parameter interactions or provide additional semantic context. This meets the baseline for high schema coverage.

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 ('Update') and resource ('a list entry') with a specific example of changing stage values. It distinguishes the tool from siblings like 'update-record' by specifying it operates on list entries rather than general records. However, it doesn't explicitly contrast with all sibling tools that might modify list data.

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. It doesn't mention prerequisites, when-not-to-use scenarios, or compare with sibling tools like 'update-record', 'add-record-to-list', or 'remove-record-from-list' that might handle related operations. The example is helpful but doesn't constitute usage guidance.

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