Skip to main content
Glama
sam-wilkie

Kommo Kiro MCP

bulk_update_leads

Idempotent

Update multiple Kommo CRM leads in a single PATCH request by merging each lead ID with its specified fields, so batch changes avoid separate calls.

Instructions

Update many leads in a single PATCH /leads request. Each item merges its fields with the lead id and uses the same field keys as update_lead. Returns the Kommo response for the batch. Use update_lead for a single lead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
leads_updatesYesUpdates to apply, one per lead. Example: [{"id": 123, "fields": {"status_id": 456}}].

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_linksNoHAL links as returned by Kommo (self, next, ...).
_embeddedNoUpdated leads.
_total_itemsNoNumber of leads updated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.3
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Kommo bulk update response: the updated leads (usually id, name, updated_at) under _embedded.",
      +  "properties": {
      +    "_embedded": {
      +      "additionalProperties": true,
      +      "description": "Updated leads.",
      +      "properties": {
      +        "leads": {
      +          "description": "Embedded leads.",
      +          "items": {
      +            "additionalProperties": true,
      +            "description": "A Kommo lead. Fields beyond those listed (embedded contacts, companies, etc.) may appear. Write operations may return only id, name, updated_at and request_id.",
      +            "properties": {
      +              "_embedded": {
      +                "additionalProperties": true,
      +                "description": "Embedded tags, contacts and companies.",
      +                "properties": {
      +                  "tags": {
      +                    "description": "Embedded tags.",
      +                    "items": {
      +                      "additionalProperties": true,
      +                      "description": "A Kommo tag.",
      +                      "properties": {
      +                        "color": {
      +                          "description": "Tag color, or null.",
      +                          "type": [
      +                            "string",
      +                            "null"
      +                          ]
      +                        },
      +                        "id": {
      +                          "description": "Tag ID.",
      +                          "type": "integer"
      +                        },
      +                        "name": {
      +                          "description": "Tag name.",
      +                          "type": [
      +                            "string",
      +                            "null"
      +                          ]
      +                        }
      +                      },
      +                      "type": "object"
      +                    },
      +                    "type": "array"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "_links": {
      +                "additionalProperties": true,
      +                "description": "HAL links as returned by Kommo (self, next, ...).",
      +                "properties": {},
      +                "type": "object"
      +              },
      +              "account_id": {
      +                "description": "Kommo account ID.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "closed_at": {
      +                "description": "Closing time, Unix seconds, or null.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "closest_task_at": {
      +                "description": "Next task deadline, Unix seconds, or null.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "created_at": {
      +                "description": "Creation time, Unix seconds.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "created_by": {
      +                "description": "ID of the user who created it.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "custom_fields_values": {
      +                "description": "Custom field values in Kommo format: objects with field_id, field_code and values.",
      +                "items": {
      +                  "additionalProperties": true,
      +                  "description": "One custom field with its values.",
      +                  "properties": {},
      +                  "type": "object"
      +                },
      +                "type": [
      +                  "array",
      +                  "null"
      +                ]
      +              },
      +              "group_id": {
      +                "description": "ID of the responsible user's group.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "id": {
      +                "description": "Lead ID.",
      +                "type": "integer"
      +              },
      +              "is_deleted": {
      +                "description": "Whether the lead is deleted.",
      +                "type": [
      +                  "boolean",
      +                  "null"
      +                ]
      +              },
      +              "loss_reason_id": {
      +                "description": "Loss reason ID, or null.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "name": {
      +                "description": "Lead name.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "pipeline_id": {
      +                "description": "Pipeline ID.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "price": {
      +                "description": "Lead budget.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "responsible_user_id": {
      +                "description": "ID of the responsible Kommo user.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "status_id": {
      +                "description": "Current stage ID.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "updated_at": {
      +                "description": "Last update time, Unix seconds.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "updated_by": {
      +                "description": "ID of the user who last updated it.",
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "_links": {
      +      "additionalProperties": true,
      +      "description": "HAL links as returned by Kommo (self, next, ...).",
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "_total_items": {
      +      "description": "Number of leads updated.",
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • changedInput schema / properties / leads_updates / description
      Previous value: -"Array of {id, fields} objects"New value: +"Updates to apply, one per lead. Example: [{\"id\": 123, \"fields\": {\"status_id\": 456}}]."
    • addedInput schema / properties / leads_updates / items / properties / fields / description
      Added value: +"Raw Kommo v4 lead fields to change for this lead (see update_lead)."
    • addedInput schema / properties / leads_updates / items / properties / id / description
      Added value: +"Kommo lead ID (integer). Obtain it from list_leads or from the create_lead result."
  3. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare non-read-only, idempotent, non-destructive, open-world. The description adds genuinely useful mechanics beyond that: each item merges `fields` with its `id`, and the return is the batch Kommo response. It omits batch-size limits and per-item partial-failure behavior, which matter most for a bulk mutation.

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?

Three short sentences with no filler; the request shape and merge semantics come first, and the sibling routing hint is last. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation, and the description covers request construction and sibling routing adequately. The remaining gap is operational context for a bulk write (batch limits, error handling), which is minor given annotation coverage.

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%, and the schema already documents `id` sourcing and that `fields` mirrors update_lead. The description restates that field keys match update_lead but adds no format, constraint, or limit detail beyond the structured data, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (update), resource (leads), and scope (many, via a single PATCH /leads request). It explicitly contrasts itself with update_lead for single-lead updates, so an agent can route correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the alternative (update_lead) and the condition that selects it (a single lead). However, it gives no guidance on when bulk is inappropriate, e.g. batch size limits or whether mixing creates/updates in one call is allowed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.