Skip to main content
Glama

list-notes

Retrieve notes for any CRM record type including companies, people, deals, or tasks by specifying the record ID and resource type.

Instructions

Get notes for any record type (companies, people, deals)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return
offsetNoNumber of results to skip for pagination
parent_record_idNoAlias for record_id (backward compatibility)
record_idNoRecord ID to list notes for
resource_typeYesType of resource to operate on (companies, people, lists, records, tasks)

Implementation Reference

  • Primary handler function executing the list-notes tool logic: fetches notes from Attio API /v2/notes using GET with query parameters for parent resource and record.
    export async function handleListNotes( client: HttpClient, params: { resource_type: 'companies' | 'people' | 'deals'; record_id: string; limit?: number; offset?: number; } ): Promise<ToolResult> { try { const { resource_type, record_id, limit = 10, offset = 0 } = params; // Notes API uses GET with query params, not POST const queryParams = new URLSearchParams({ parent_object: resource_type, parent_record_id: record_id, limit: String(limit), offset: String(offset), }); const response = await client.get<AttioApiResponse<AttioNote[]>>( `/v2/notes?${queryParams.toString()}` ); const notes = response.data.data; if (!notes || notes.length === 0) { return structuredResult( [], `No notes found for ${resource_type} ${record_id}` ); } const lines = notes.map((note) => { const noteId = note.id?.note_id || 'unknown'; const title = note.title || 'Untitled'; const preview = (note.content_plaintext || '').slice(0, 100); return `- ${title} (ID: ${noteId})\n ${preview}${preview.length >= 100 ? '...' : ''}`; }); return structuredResult( notes, `Notes for ${resource_type} ${record_id}:\n${lines.join('\n')}` ); } catch (error) { const { message, details } = extractErrorInfo(error); return errorResult(message || 'Failed to list notes', details); } }
  • Registration of list-notes in the central tool handler dispatcher map.
    'list-notes': async (client, params) => handleListNotes(client, params as Parameters<typeof handleListNotes>[1]), };
  • Input schema, description, and annotations defining the list-notes tool interface.
    export const listNotesDefinition: ToolDefinition = { name: 'list-notes', description: formatDescription({ capability: 'Retrieve notes for a record with timestamps', boundaries: 'create or modify notes; read-only', constraints: 'Requires resource_type, record_id; sorted by creation date', recoveryHint: 'If empty, verify record has notes with records_get_details', }), inputSchema: { type: 'object', properties: { resource_type: { type: 'string', enum: ['companies', 'people', 'deals'], description: 'Type of resource to list notes for', }, record_id: { type: 'string', description: 'Record ID to list notes for', }, ...PAGINATION_SCHEMA, }, required: ['resource_type', 'record_id'], }, annotations: { readOnlyHint: true, }, };
  • Export and registration of listNotesDefinition in coreToolDefinitions map.
    'list-notes': listNotesDefinition,
  • Universal tool configuration registration for list-notes in main application handlers.
    'list-notes': listNotesConfig,

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