Skip to main content
Glama
Miguelgbastos

Kommo CRM MCP Server

get_leads

Retrieve a list of leads from Kommo CRM with options to specify limit and pagination for efficient lead management and integration.

Instructions

Get list of leads from Kommo CRM

Input Schema

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

Implementation Reference

  • Handler for the 'get_leads' tool. Extracts parameters (limit, page), calls KommoAPI.getLeads, and returns the leads data as a JSON string in the MCP response format.
    case 'get_leads':
      const leadsLimit = args?.limit || 1000;
      const leadsPage = args?.page || 1;
      const leadsData = await kommoAPI.getLeads({ limit: leadsLimit, page: leadsPage });
    
      result = {
        content: [
          {
            type: 'text',
            text: JSON.stringify(leadsData, null, 2)
          }
        ]
      };
      break;
  • Input schema definition for the 'get_leads' tool, specifying optional limit and page parameters.
    {
      name: 'get_leads',
          description: 'Obter lista de leads do Kommo CRM',
      inputSchema: {
        type: 'object',
        properties: {
              limit: { type: 'number', description: 'Número máximo de leads (padrão: 1000)' },
              page: { type: 'number', description: 'Página para paginação (padrão: 1)' }
            }
          }
  • Registration of the 'get_leads' tool in the MCP tools/list endpoint response, listing it among available tools.
    if (method === 'tools/list') {
      const response = {
        jsonrpc: '2.0',
        id,
        result: {
          tools: [
        {
          name: 'get_leads',
              description: 'Obter lista de leads do Kommo CRM',
          inputSchema: {
            type: 'object',
            properties: {
                  limit: { type: 'number', description: 'Número máximo de leads (padrão: 1000)' },
                  page: { type: 'number', description: 'Página para paginação (padrão: 1)' }
                }
              }
            },
            {
              name: 'create_lead',
              description: 'Criar um novo lead no Kommo CRM',
          inputSchema: {
            type: 'object',
            properties: {
                  name: { type: 'string', description: 'Nome do lead' },
                  price: { type: 'number', description: 'Valor do lead' },
                  status_id: { type: 'number', description: 'ID do status' }
                },
                required: ['name']
              }
            },
            {
              name: 'get_sales_report',
              description: 'Obter relatório de vendas do Kommo CRM',
          inputSchema: {
            type: 'object',
            properties: {
                  limit: { type: 'number', description: 'Número máximo de leads (padrão: 1000)' },
                  page: { type: 'number', description: 'Página para paginação (padrão: 1)' }
                }
          }
        },
        {
          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)' }
                }
          }
        },
        {
          name: 'get_companies',
              description: 'Obter lista de empresas do Kommo CRM',
          inputSchema: {
            type: 'object',
            properties: {
                  limit: { type: 'number', description: 'Número máximo de empresas (padrão: 1000)' },
                  page: { type: 'number', description: 'Página para paginação (padrão: 1)' }
                }
          }
        },
        {
          name: 'get_tasks',
              description: 'Obter lista de tarefas do Kommo CRM',
          inputSchema: {
            type: 'object',
            properties: {
                  limit: { type: 'number', description: 'Número máximo de tarefas (padrão: 1000)' },
                  page: { type: 'number', description: 'Página para paginação (padrão: 1)' }
                }
              }
            },
            {
              name: 'ask_kommo',
              description: 'Fazer perguntas inteligentes sobre dados do Kommo CRM usando IA conversacional',
          inputSchema: {
            type: 'object',
            properties: {
                  question: { type: 'string', description: 'Pergunta sobre dados do Kommo CRM' }
                },
                required: ['question']
              }
            }
          ]
        }
      };
  • Helper method in KommoAPI class that makes the actual API request to fetch leads from Kommo CRM.
    async getLeads(params?: any): Promise<{ _embedded: { leads: KommoLead[] } }> {
      const response = await this.client.get('/api/v4/leads', { params });
      return response.data;
    }
  • TypeScript interface defining the structure of a KommoLead object, used in the getLeads response.
    export interface KommoLead {
      id: number;
      name: string;
      price: number;
      status_id: number;
      pipeline_id: number;
      created_at: number;
      updated_at: number;
      responsible_user_id: number;
      created_by: number;
      closed_at?: number;
      loss_reason_id?: number;
      source_id?: number;
      tags?: string[];
      contacts?: KommoContact[];
      companies?: KommoCompany[];
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a list but doesn't mention pagination behavior (implied by the 'page' parameter), rate limits, authentication requirements, or what data fields are included in the leads. For a read operation with no annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly, which is ideal for conciseness in tool selection.

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 complexity of a CRM tool with no annotations and no output schema, the description is insufficient. It doesn't explain the return format (e.g., structure of lead objects), error handling, or how it integrates with sibling tools. For a tool that likely returns structured data, more context is needed to use it effectively.

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%, with clear documentation for 'limit' (max 250) and 'page' (pagination). The description adds no additional parameter semantics beyond what the schema provides, such as default values or interaction between parameters. This meets the baseline for high schema coverage but doesn't enhance understanding.

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 ('Get list of') and resource ('leads from Kommo CRM'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other lead-related siblings like 'get_lead_analytics' or 'get_lead_conversion_report', which would require more specificity about scope or data returned.

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. With multiple sibling tools related to leads (e.g., 'get_lead_analytics', 'get_lead_conversion_report'), there's no indication of whether this is for basic lead listing versus analytical or filtered views, leaving the agent to guess based on tool names alone.

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

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

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