Skip to main content
Glama

Samuelz® Sales

Zugeordnete Vertriebskosten lesen

get_sales_costs
Read-onlyIdempotent

Read costs already attributed to one learning opportunity or channel; use get_sales_cost_sources to discover original invoices and allocate_sales_cost only for an explicitly requested change. kind and id identify the same existing target. Read one page of explicit invoice net allocations to an existing learning opportunity or channel. Follow nextCursor as after. Optionally choose a returned allocationId as historyAllocationId to read its recorded corrections/releases; follow history.nextBeforeRevision as historyBeforeRevision with that same ID. Both lists are bounded to 20 entries/120KB per page. Historical revisions obey the same current Accounting visibility, original fingerprint, target customer and owner authority checks; unavailable or changed sources/targets have no amounts. History never enters current totals. Concurrent allocation or target/customer changes conflict; current read consent is rechecked. Known amounts cover only the current allocation page; complete costs, payment and full contribution remain unknown. No tenant selector, new ledger or financial mutation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kind": "<kind>",
      "id": "<id>"
    },
    "name": "get_sales_costs"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesExact existing learning opportunity or channel ID matching kind; not a customer, invoice or allocation ID.
kindYesExisting attribution target type, opportunity or channel. Keep kind, id and current revision from the same target.
afterNoCopy nextCursor from the preceding current-allocation page for the same kind/id. Omit for the first page.
historyAllocationIdNoExisting allocationId returned for this same target; selects that allocation’s recorded corrections/releases, not another source document.
historyBeforeRevisionNoCopy history.nextBeforeRevision with the same historyAllocationId to continue history. Never use the current-page after cursor here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / after / description
      Added value: +"Copy nextCursor from the preceding current-allocation page for the same kind/id. Omit for the first page."
    • addedInput schema / properties / historyAllocationId / description
      Added value: +"Existing allocationId returned for this same target; selects that allocation’s recorded corrections/releases, not another source document."
    • addedInput schema / properties / historyBeforeRevision / description
      Added value: +"Copy history.nextBeforeRevision with the same historyAllocationId to continue history. Never use the current-page after cursor here."
    • addedInput schema / properties / id / description
      Added value: +"Exact existing learning opportunity or channel ID matching kind; not a customer, invoice or allocation ID."
    • addedInput schema / properties / kind / description
      Added value: +"Existing attribution target type, opportunity or channel. Keep kind, id and current revision from the same target."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered; the description still adds substantial context beyond that — page bounds (20 entries/120KB), visibility/fingerprint/authority rechecks, that unavailable sources yield no amounts, that history never enters current totals, and that concurrent changes conflict. The only mild gap is that 'read consent is rechecked' and the conflict behavior are stated without saying what the agent sees when consent fails.

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

Conciseness3/5

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

The purpose and alternative routing are front-loaded, which is good, but the second sentence ('Read one page of explicit invoice net allocations to an existing learning opportunity or channel') largely restates the first, and the later sentences chain several independent rules into long run-ons without separators. Dense and jargon-heavy, though not padded with filler.

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?

With no output schema, the description does the work of describing return shape — cursor names, history fields, per-page limits — which is what an agent needs to paginate and to follow history. It also bounds the value of the answer ('complete costs, payment and full contribution remain unknown'), which prevents misuse of the totals; only the concrete amount/field layout is left implicit.

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 earns a bump by explaining the coupling between kind and id ('identify the same existing target') and by spelling out the two cursor protocols — nextCursor as after, and allocationId as historyAllocationId paired with history.nextBeforeRevision. Most of that is, however, close to what the schema descriptions already say, so it is reinforcement rather than new meaning.

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 ('Read costs already attributed to one learning opportunity or channel') and immediately distinguishes itself from both siblings by name, telling the agent which tool discovers invoices and which one mutates. The target scope (kind + id) is unambiguous.

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?

Explicitly routes the agent: use get_sales_cost_sources to discover original invoices, use allocate_sales_cost only for an explicitly requested change, and use this tool for reading existing attributions. It also warns that no tenant selector, new ledger or financial mutation exists here, closing off wrong expectations.

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