Skip to main content
Glama

Долги и взаиморасчёты

smartup_debt
Read-onlyIdempotent

Calculate client debt from shipments, payments, and returns over any period. Identify which clients owe money and who needs a follow-up call.

Instructions

Сколько клиент должен: отгрузки минус оплаты минус возвраты за период. Отвечает на «кто сколько должен», «есть ли долг у клиента», «кому пора звонить». Считается из заказов, оплат и возвратов — трёх выгрузок. Дата: 2026-09-06, 06.09.2026, «вчера» или «-7d».

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoКонец периода. По умолчанию сегодня
beginNoНачало периода. По умолчанию 90 дней назад
limitNoСколько клиентов показать
queryNoТолько клиенты, чьё название или код содержит эту строку
filial_codeNo
person_codeNoТолько этот контрагент
only_debtorsNoОставить тех, у кого долг больше нуля. По умолчанию да

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already mark the tool as readOnly, idempotent, openWorld, and non-destructive. The description adds meaningful behavioral context beyond those flags: the exact formula, the fact that it depends on three data extracts, and the accepted date formats ('2026-09-06', '06.09.2026', 'вчера', '-7d'). It does not fully describe output shape, but the annotations lower the required burden.

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 compact: four short sentences, front-loaded with the core definition, followed by use cases, data sources, and date syntax. Every sentence contributes information and there is no redundant filler or boilerplate.

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 read-only calculation tool with no required parametersising and a well-covered schema, the description provides the essential formula, answerable questions, data origin, and date syntax. It does not describe output row contents or explain filial_code, but those omissions are minor because the tool is non-destructive, annotations cover behavior, and the schema covers defaults.

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 high (86%) and already explains begin, end, limit, query, person_code, and only_debtors. The description adds extra value by specifying date input formats for begin/end and by clarifying that the result is a period-based calculation. The only gap is filial_code, which has no schema description and is not explained here either, but overall the description supplements the schema usefully.

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 a concrete computation: 'отгрузки минус оплаты минус возвраты за период' (shipments minus payments minus returns), and names the exact business questions it answers: 'кто сколько должен', 'есть ли долг у клиента', 'кому пора звонить'. This distinguishes it from sibling tools like smartup_orders, smartup_payments, and smartup_returns by explaining that it is calculated from those three sources.

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?

The description clearly frames when to use the tool by giving the questions it responds to, such as 'кто сколько должен' and 'кому пора звонить'. It does not explicitly list alternatives or say 'use X instead' for non-debt scenarios, but the phrase 'Считается из заказов, оплат и возвратов — трёх выгрузок' implies that raw-order, payment, or return queries belong in sibling tools.

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