Skip to main content
Glama

Balance-Weighted Receivable Age

bpj_balance_weighted_receivable_age
Read-onlyIdempotent

Weight the age of two open balances by their amounts to estimate the average age of outstanding cash.

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": {
      "balanceA": "<balanceA>",
      "ageA": "<ageA>",
      "balanceB": "<balanceB>",
      "ageB": "<ageB>"
    },
    "name": "bpj_balance_weighted_receivable_age"
  }
}

Input Schema

NameRequiredDescriptionDefault
ageAYes
ageBYes
balanceAYes
balanceBYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare this a read-only, idempotent, non-destructive, closed-world computation, so safety is covered. The description adds nothing further: it does not disclose the actual weighting formula, whether A/B ordering matters, or what happens if both balances are zero (division by zero), which is the main behavioral risk here.

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?

A single front-loaded sentence with no filler words. It is efficient, though the terse phrasing contributes to the ambiguity about the exact computation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple four-parameter pure calculation with clean annotations and no output schema, the description is minimally adequate. It should state the weighted-average formula and the zero-denominator edge case to be complete for an agent that must invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the schema titles already identify each parameter (age in days, outstanding balance). The description only loosely maps 'two open balances' and 'their amounts' to the A/B parameters and adds no unit or ordering clarifications beyond the schema, so it does not compensate for the gap.

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 gives a specific verb and resource: weight two balances by their amounts to estimate average age of outstanding cash. It is clearly distinct from siblings like bpj_pairs_weighted_mean, though it never names or contrasts with them explicitly.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no prerequisites, and no mention of alternatives such as a generic weighted-mean tool. The two-balance scope is implied by the phrasing, but an agent gets no routing signal.

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.