Skip to main content
Glama

compute_trade_spend

Read-only

Split a trade-spend payment to a customer (co-op advertising, MDF, slotting, listing allowance) under ASC 606-10-32-26 / 705-20-25-2. If the payment buys a DISTINCT good or service the customer actually provides (e.g. advertising with proof-of-performance), it's a purchase/expense UP TO that good's fair value; any EXCESS over fair value reduces revenue. Give the payment amount, whether it buys a distinct good/service, and that good's fair value — it returns the expense leg and the revenue-reduction leg. It refuses (asks) for the fair value rather than guess; if it buys nothing distinct, the whole payment reduces revenue (no split). Nothing posts; a principal signs the close.

Input Schema

NameRequiredDescriptionDefault
payment_usdYesThe trade-spend payment to the customer.
fair_value_usdNoFair value of that distinct good/service. Required to split; omit and it will ask.
buys_distinct_good_or_serviceNoTrue if the customer transfers a distinct good/service (e.g. advertising with proof-of-performance). False → the whole payment reduces revenue (no split).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Adds meaningful behavior beyond the readOnlyHint: it refuses rather than guesses when fair value is missing, posts nothing, and requires principal sign-off at close. That is exactly the kind of non-obvious trait an agent needs. Minor gap: it doesn't describe any precision/rounding or audit-trail behavior of the computation itself.

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?

Tightly packed prose with the core action front-loaded and the branch logic following in dependency order. The jargon density and em-dash clauses make it heavy, but no sentence is wasted.

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?

With no output schema, the description carries the return-value burden and does so: it names the expense leg and revenue-reduction leg, the no-split case, and the refusal path. An agent can call this correctly and anticipate the response shape from the description alone.

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 coverage is 100%, so the baseline is 3; the description goes further by explaining the accounting meaning of each input's branch (distinct good → split up to fair value; excess → revenue reduction; no distinct good → no split). This adds interpretive value the schema's one-line property docs don't supply.

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 and resource ('Split a trade-spend payment to a customer') plus the governing standard (ASC 606-10-32-26 / 705-20-25-2). It is clearly distinguishable from accounting siblings like compute_revenue_contract, compute_commission, and compute_close.

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?

Clearly says what inputs define the scenario (payment amount, distinct good/service flag, fair value) and how the branch condition changes the outcome. It does not, however, name an alternative tool or exclusion ('use compute_revenue_contract if...'), so routing among the many compute_* siblings is left to the accountant's judgment.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources