Skip to main content
Glama

Calculate affiliate commission

calculate_affiliate_commission
Read-onlyIdempotent

Calculate exact monthly CPA, revenue-share and hybrid earned commission from explicit versioned contract terms and monthly NGR. Version 1 supports flat rates; version 2 also supports whole or marginal bands. Returns exact decimal strings, assumptions and limitations. Does not look up programme terms or predict outcomes. Calculation inputs and results are not logged.

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": {
      "input": "<input>"
    },
    "name": "calculate_affiliate_commission"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesExplicit versioned monthly commission inputs. V1 is flat-only; V2 permits flat or banded revenue share. No default offer is supplied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds value beyond that: it discloses the return shape ('exact decimal strings, assumptions and limitations') and the privacy behavior that inputs and results are not logged. It stops short of describing validation failure modes or what happens on contract terms outside the supported set.

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?

Four tight sentences, all front-loaded: purpose, version scope, return content, then exclusions and privacy. Every sentence adds distinct information and nothing is repeated from annotations or schema.

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?

There is no output schema, yet the description tells the agent what comes back (exact decimal strings plus assumptions and limitations), which is the critical missing piece for a deterministic calculator. It also bounds scope with the version rules and the no-lookup/no-prediction constraints, so an agent can call it correctly without further context.

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 100%, so the nested fields, patterns and tierMode semantics are already documented. The description still adds framing that helps before opening the schema: version 1 is flat-only while version 2 permits whole or marginal bands, and that terms must be explicit rather than looked up. Some of this overlaps the schema's const/enum values, keeping it below a 5.

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 — 'Calculate exact monthly CPA, revenue-share and hybrid earned commission from explicit versioned contract terms and monthly NGR' — and enumerates the three commission models covered. The clauses 'Does not look up programme terms or predict outcomes' separate it from sibling tools like project_affiliate_commission and explain_term without needing a schema comparison.

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?

Clear context on when this applies (you have explicit contract terms plus monthly NGR) and explicit exclusions — it will not fetch programme terms and will not forecast. The gap is that it never names the sibling an agent should use for those excluded cases (e.g. project_affiliate_commission), leaving that routing to inference.

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