Skip to main content
Glama

get_contacts

Retrieve a list of contacts from Kommo CRM with pagination support, enabling efficient access and management of CRM data. Supports custom limits up to 250 entries per request.

Instructions

Get list of contacts from Kommo CRM

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of contacts to return (max 250)
pageNoPage number for pagination

Implementation Reference

  • Registration of the 'get_contacts' tool in the MCP tools/list response, including name, description, and input schema.
    name: 'get_contacts', description: 'Obter lista de contatos do Kommo CRM', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Número máximo de contatos (padrão: 1000)' }, page: { type: 'number', description: 'Página para paginação (padrão: 1)' } } } }, {
  • Handler for the 'get_contacts' tool call, which invokes kommoAPI.getContacts with parameters and returns the JSON response.
    case 'get_contacts': const contactsLimit = args?.limit || 1000; const contactsPage = args?.page || 1; const contactsData = await kommoAPI.getContacts({ limit: contactsLimit, page: contactsPage }); result = { content: [ { type: 'text', text: JSON.stringify(contactsData, null, 2) } ] }; break;
  • Core helper method in KommoAPI class that makes the API request to fetch contacts from Kommo CRM.
    async getContacts(params?: any): Promise<{ _embedded: { contacts: KommoContact[] } }> { const response = await this.client.get('/api/v4/contacts', { params }); return response.data; }
  • TypeScript interface defining the structure of KommoContact objects returned by the getContacts method.
    export interface KommoContact { id: number; name: string; first_name: string; last_name: string; responsible_user_id: number; created_by: number; created_at: number; updated_at: number; custom_fields_values?: any[]; tags?: string[]; leads?: KommoLead[]; companies?: KommoCompany[]; }

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/Miguelgbastos/Kommo-MCP'

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