Skip to main content
Glama

Создать или изменить контрагента

counterparties_save

Create or update a counterparty card: omit ID and give name to create, or pass ID and only changed fields to edit. Null clears a contact; custom_fields replaces the map.

Instructions

Без counterparty_id создаёт карточку; для создания нужно name, dialog_ids содержит явно выбранные UUID. При правке передавайте только изменённые поля; null очищает контакт, custom_fields заменяет карту целиком. Связи существующей карточки меняют через counterparties_link/unlink.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseNoДело: название или идентификатор. Если не указать, берётся дело по умолчанию, иначе последнее открытое в панели.
nameNo
emailNo
notesNo
phoneNo
companyNo
dialog_idsNo
custom_fieldsNo
counterparty_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare mutation status (readOnlyHint=false) and open-world/idempotency hints, but the description adds critical behavioral detail beyond them: null clears a contact field, custom_fields replaces the whole map, dialog_ids must be explicitly selected, and only changed fields should be passed during an edit. These are meaningful mutation semantics not present in the structured data.

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 compact semicolon-separated clauses, front-loading the create/update condition first. Every sentence carries actionable information with no filler.

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

Completeness5/5

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

For a 9-parameter create-or-update mutation with nested objects and no output schema, the description covers the essential call semantics: create vs edit, required fields for creation, partial-edit behavior, null clearing, full replacement of custom_fields, and where link changes belong. No output-schema explanation is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 11%, so the description must compensate, and it does add key semantics: counterparty_id selects create vs update, name is required for creation, dialog_ids must be explicit UUIDs, null clears contact fields, and custom_fields replaces the map entirely. However, it does not cover every parameter (e.g., notes, case specifics are left to the schema), so it is strong but not complete.

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?

The first sentence states a specific verb+resource and the condition that selects create versus edit: 'Without counterparty_id creates a card'. It also names the sibling tools for a related operation ('links of an existing card are changed via counterparties_link/unlink'). An agent can distinguish this save tool from counterparties_get, counterparties_list, and counterparties_delete without opening further schemas.

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

Usage Guidelines5/5

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

Explicit when-to-use guidance: omit counterparty_id to create, pass it to edit, and for creation name is required and dialog_ids must contain explicitly selected UUIDs. It also states the edit convention ('pass only changed fields'), the null behavior, and the alternative for link management. This gives clear conditions and alternatives.

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

Deploy Server

Other Tools