Skip to main content
Glama

discounts__calculate_loyalty_checkin

Read-only

Calculate discounts and loyalty for an order using loyalty programs, coupons, manual conditions, and dynamic discounts. Returns applied discounts and surcharges to finalize order pricing.

Instructions

Расчёт скидок/лояльности для заказа (высокочастотный вызов).

Верхнеуровневые coupon/manual_conditions/dynamic_discounts в request — obsolete; передавать через order.loyalty_info. Где взять ID: comboGroupId → menu__get_combos_info; comboId → menu__get_combos_info; comboSourceId → menu__get_combos_info; manualConditionId → discounts__get_loyalty_manual_conditions; marketingSourceId → marketing_sources__get_marketing_sources; operatorId → employees__get_couriers; orderTypeId → dictionaries__get_delivery_order_types; organizationId → organizations__get_organizations; paymentTypeId → dictionaries__get_payment_types; priceCategoryId → menu__get_external_menus; productSizeId → menu__get_nomenclature; programId → discounts__get_loyalty_programs; sizeId → menu__get_nomenclature; sourceId → marketing_sources__get_marketing_sources; terminalGroupId → terminal_groups__get_terminal_groups; tipsTypeId → dictionaries__get_tips_types. Троттлинг MCP-сервера (не лимит iikoCloud): не чаще 1000 запрос(ов) за 60 с — кэшируйте результат в диалоге.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavioral context: it is a high-frequency call, subject to MCP-server throttling of 1000 requests per 60 seconds, and results should be cached. It also flags obsolete fields and directs the agent to the correct current location, which goes beyond what annotations provide. No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The main purpose is front-loaded in the first sentence. The long ID lookup list is dense but each entry earns its place, and the throttling/caching note is practical. The structure could be improved with bullet formatting, but it is still efficient and scannable as a logical mapping list.

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 tool with a large nested schema and no output schema, the description covers the critical invocation concerns: deprecated fields, ID sourcing, and rate limiting. It does not explain the return value, but the tool's purpose implies the output. Given the complexity, it is reasonably complete, though a note on expected response would make it fully so.

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 0%, so the description must compensate. It does this well by mapping many request IDs (comboGroupId, comboId, manualConditionId, marketingSourceId, etc.) to the exact sibling tools that provide them, and by clarifying that coupon/manual_conditions/dynamic_discounts at the top level are obsolete and belong in order.loyalty_info. It does not cover every field, but the most error-prone IDs are addressed.

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 opens with 'Расчёт скидок/лояльности для заказа' which clearly states the tool calculates discounts/loyalty for an order. The verb and resource are specific, but it does not distinguish this from the sibling tool `discounts__calculate_order_loyalty`, so it misses the differentiation that would earn a 5.

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

Usage Guidelines3/5

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

The description gives important usage guidance: which top-level fields are obsolete and where to place them (order.loyalty_info), plus a detailed mapping of ID fields to source tools. However, it never says when to use this tool instead of the closely related `discounts__calculate_order_loyalty`, and no exclusions are given. The context is present but the when-vs-alternative guidance is absent.

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