get_tasks
Retrieve a list of tasks from Kommo CRM with pagination and customizable limits to streamline task management and workflow efficiency.
Instructions
Get list of tasks from Kommo CRM
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of tasks to return (max 250) | |
| page | No | Page number for pagination |
Implementation Reference
- src/http-streamable.ts:730-739 (registration)Registration of the 'get_tasks' tool in the MCP tools/list response, including its input schema.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)' } } } },
- src/http-streamable.ts:1345-1358 (handler)Handler function for the 'get_tasks' MCP tool that calls KommoAPI.getTasks and formats the response.case 'get_tasks': const tasksLimit = args?.limit || 1000; const tasksPage = args?.page || 1; const tasksData = await kommoAPI.getTasks({ limit: tasksLimit, page: tasksPage }); result = { content: [ { type: 'text', text: JSON.stringify(tasksData, null, 2) } ] }; break;
- src/kommo-api.ts:320-322 (helper)Helper method in KommoAPI class that fetches tasks from the Kommo API endpoint.async getTasks(params?: any): Promise<{ _embedded: { tasks: KommoTask[] } }> { const response = await this.client.get('/api/v4/tasks', { params }); return response.data;
- src/http-streamable.ts:732-738 (schema)Input schema definition for the 'get_tasks' tool.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)' } } }