Skip to main content
Glama

Зарегистрировать договор (ОРД)

create_contract

Register an ORD contract between your account and an advertiser, receiving contract ID and API point balance. Handles service, intermediary, and external types with distinct required fields.

Instructions

Регистрирует договор ОРД между аккаунтом и рекламодателем и возвращает {id} плюс apiPointBalance (остаток недельных баллов API). Набор обязательных полей зависит от type: service требует subject, isReportingRequired, date и number (cid отклоняется); intermediary — всё то же плюс object и isFundsAllocationToPrincipal (cid отклоняется); external — только cid (parentId отклоняется). Юридические реквизиты исполнителя передаются в intermediary — они обязательны, если не задан parentId; с parentId запись становится дополнительным соглашением к тому договору, и intermediary в ней быть не должно. Эндпоинтов изменения и удаления нет, поэтому ошибочный договор остаётся на аккаунте навсегда.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidNoВнешний идентификатор договора (со стороны ERID). Обязателен для типа external, для остальных отклоняется.
dateNoДата договора, YYYY-MM-DD. Обязательна для service и intermediary.
typeYesТип договора: service (оказание услуг), intermediary (посреднический), external (заключён вне Авито, определяется по cid).
numberNoНомер договора. Обязателен для service и intermediary.
objectNoДействие по договору, поле API `object`: distribution, conclude, commercial, other. Обязательно для intermediary.
subjectNoПредмет договора: org-distribution, mediation, distribution, representation, other. Обязателен для service и intermediary.
parentIdNoId родительского договора. Задаётся, чтобы зарегистрировать дополнительное соглашение; тогда intermediary опускается.
advertiserIdYesРекламодатель, с которым заключён договор (клиент). Id даёт list_advertisers.
intermediaryNoЮридические реквизиты исполнителя (посредника). Обязательны, если не задан parentId.
counterpartyTypeYesТип контрагента — уходит в API в поле `description`: direct_with_advertiser или advertiser_intermediary.
isReportingRequiredNoНужны ли по договору акты и отчёты. Обязательно для service и intermediary.
isFundsAllocationToPrincipalNoРаспределяются ли средства в пользу принципала. Обязательно для intermediary.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changedv1.1.0
    • changedInput schema / properties / advertiserId / description
      Previous value: -"Advertiser this contract is with (the client). From list_advertisers."New value: +"Рекламодатель, с которым заключён договор (клиент). Id даёт list_advertisers."
    • changedInput schema / properties / cid / description
      Previous value: -"External contract id (ERID-side identifier). Required for type external, rejected for the others."New value: +"Внешний идентификатор договора (со стороны ERID). Обязателен для типа external, для остальных отклоняется."
    • changedInput schema / properties / counterpartyType / description
      Previous value: -"Counterparty type — sent as the API's `description` field: direct_with_advertiser or advertiser_intermediary."New value: +"Тип контрагента — уходит в API в поле `description`: direct_with_advertiser или advertiser_intermediary."
    • changedInput schema / properties / date / description
      Previous value: -"Contract date, YYYY-MM-DD. Required for service and intermediary."New value: +"Дата договора, YYYY-MM-DD. Обязательна для service и intermediary."
    • changedInput schema / properties / intermediary / description
      Previous value: -"Legal details of the contractor (the intermediary). Required unless parentId is set."New value: +"Юридические реквизиты исполнителя (посредника). Обязательны, если не задан parentId."
    • changedInput schema / properties / intermediary / properties / actualAddress / description
      Previous value: -"Actual (postal) address."New value: +"Фактический (почтовый) адрес."
    • changedInput schema / properties / intermediary / properties / inn / description
      Previous value: -"Taxpayer number (INN) of the contractor."New value: +"ИНН исполнителя."
    • changedInput schema / properties / intermediary / properties / kpp / description
      Previous value: -"Tax registration reason code (KPP); companies (ul) only."New value: +"КПП; только для юрлиц (ul)."
    • changedInput schema / properties / intermediary / properties / legalAddress / description
      Previous value: -"Registered legal address."New value: +"Юридический адрес."
    • changedInput schema / properties / intermediary / properties / legalType / description
      Previous value: -"Legal entity type: ul (company) or ip (sole trader)."New value: +"Тип юридического лица: ul (юрлицо) или ip (ИП)."
    • changedInput schema / properties / intermediary / properties / longName / description
      Previous value: -"Full legal name."New value: +"Полное юридическое наименование."
    • changedInput schema / properties / intermediary / properties / ogrn / description
      Previous value: -"State registration number (OGRN for a company, OGRNIP for a sole trader)."New value: +"Государственный регистрационный номер (ОГРН для юрлица, ОГРНИП для ИП)."
    • changedInput schema / properties / intermediary / properties / shortName / description
      Previous value: -"Short legal name, e.g. \"OOO Reklama\"."New value: +"Краткое юридическое наименование, например \"ООО Реклама\"."
    • changedInput schema / properties / isFundsAllocationToPrincipal / description
      Previous value: -"Whether funds are allocated to the principal. Required for intermediary."New value: +"Распределяются ли средства в пользу принципала. Обязательно для intermediary."
    • changedInput schema / properties / isReportingRequired / description
      Previous value: -"Whether acts/reports are required under the contract. Required for service and intermediary."New value: +"Нужны ли по договору акты и отчёты. Обязательно для service и intermediary."
    • changedInput schema / properties / number / description
      Previous value: -"Contract number. Required for service and intermediary."New value: +"Номер договора. Обязателен для service и intermediary."
    • changedInput schema / properties / object / description
      Previous value: -"Contract action, the API's `object` field: distribution, conclude, commercial, other. Required for intermediary."New value: +"Действие по договору, поле API `object`: distribution, conclude, commercial, other. Обязательно для intermediary."
    • changedInput schema / properties / parentId / description
      Previous value: -"Parent contract id. Set it to register an additional agreement; then omit intermediary."New value: +"Id родительского договора. Задаётся, чтобы зарегистрировать дополнительное соглашение; тогда intermediary опускается."
    • changedInput schema / properties / subject / description
      Previous value: -"Contract subject: org-distribution, mediation, distribution, representation, other. Required for service and intermediary."New value: +"Предмет договора: org-distribution, mediation, distribution, representation, other. Обязателен для service и intermediary."
    • changedInput schema / properties / type / description
      Previous value: -"Contract type: service (services rendered), intermediary (mediation), external (concluded outside Avito, identified by cid)."New value: +"Тип договора: service (оказание услуг), intermediary (посреднический), external (заключён вне Авито, определяется по cid)."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

The description discloses behaviors beyond what annotations provide: it returns {id} and apiPointBalance, and it explicitly states that erroneous contracts remain forever because there are no update/delete endpoints. Annotations only indicate readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false, which don't cover irreversibility or the return payload. This added context helps the agent understand side effects.

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 dense but every sentence carries necessary information: the core purpose and return value, type-specific field requirements, the parentId exception, and the irreversibility warning. It's front-loaded with the main verb and resource, then elaborates logically. No irrelevant details or fluff.

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?

For a complex 12-parameter tool with a nested object and conditional logic, the description covers all critical aspects: return format, type-specific required fields, the special case of additional agreements, and the lack of edit/delete. It doesn't elaborate on the meaning of apiPointBalance beyond 'remainder of weekly API points', but that suffices given the absence of an output schema. Overall, an agent has enough to call it correctly.

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

Parameters5/5

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

Although the schema describes every parameter (100% coverage), the description adds crucial semantic logic: it explains which fields are required for each type, when cid or parentId is rejected, and how intermediary fields interact with parentId. This is not fully captured in the schema's static descriptions and is essential for correct invocation, especially for nested objects and conditional requirements.

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 description states the exact purpose: 'Регистрирует договор ОРД между аккаунтом и рекламодателем' (registers an ORD contract between an account and an advertiser). It also specifies the return value ({id} and apiPointBalance) and clearly differentiates the three contract types. As the only contract creation tool among siblings, the purpose is unmistakable.

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?

While it doesn't explicitly name alternative tools, it is the sole creation tool and the description clarifies when each contract type should be used (service, intermediary, external) and the special case of parentId for additional agreements. It also warns that there are no edit/delete endpoints, implicitly guiding the agent to be careful. The guidance is clear, though a direct 'use this when creating a contract' statement is missing.

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