Skip to main content
Glama

efficiency

calculate_days_payables_outstanding

Read-onlyIdempotent

Calculate days payables outstanding (DPO): the average number of days a company takes to pay its suppliers. Formula: DPO = 365 / Payables Turnover. WHEN TO USE: Use to measure how long a company holds onto cash before paying suppliers — a source of working-capital financing. WHEN NOT TO USE: Do NOT treat very high DPO as always positive — it can indicate cash stress or strained supplier relationships. BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive; identical inputs always produce identical outputs. Division by zero or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { days_payables_outstanding: number of days (e.g. 48.7), inputs }. PARAMETERS: cogs_or_purchases (required): Cost of goods sold or purchases for the period, e.g. 600000. Must be > 0. begin_payables (required): Accounts payable at period start, e.g. 70000. Must be >= 0. end_payables (required): Accounts payable at period end, e.g. 90000. Must be >= 0.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_payablesYesAccounts payable at period end, e.g. 90000. Must be >= 0.
begin_payablesYesAccounts payable at period start, e.g. 70000. Must be >= 0.
cogs_or_purchasesYesCost of goods sold or purchases for the period, e.g. 600000. Must be > 0.

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/destructive annotations by stating the calculation is pure deterministic, has no side effects, no network or storage access, and that identical inputs produce identical outputs. It also discloses the edge-case behavior: division by zero or non-finite inputs return an explicit error.

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?

Well-structured with clear labeled sections (WHEN TO USE, BEHAVIOUR, RETURNS, PARAMETERS) and front-loaded purpose. It is somewhat wordy for a simple three-parameter calculator, but each section contributes distinct information.

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?

Complete for a deterministic financial calculator: the description covers purpose, formula, input constraints, error behavior, and return shape, while the annotations cover the safety profile. There is no output schema, so the explicit RETURNS description is especially valuable.

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?

The schema already has 100% coverage with per-parameter constraints, so the baseline is 3. The description adds meaningful financial context by naming each input's economic role (COGS/purchases, period-start and period-end payables) and reinforcing the >0/>=0 constraints with examples.

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 ('Calculate') with the resource 'days payables outstanding' and defines it as 'the average number of days a company takes to pay its suppliers.' The formula and DPO definition make it clearly distinguishable from sibling turnover and cycle metrics.

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?

Includes an explicit WHEN TO USE section explaining the cash-management question this metric answers. However, the WHEN NOT TO USE section is an interpretive caveat about interpreting high DPO rather than a routing instruction to an alternative sibling tool, so it stops short of a fully explicit alternatives-based guideline.

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.

TDQS

A4.4/5.0
Disambiguation4/5

Each tool calculates a distinct financial efficiency ratio, but some boundaries are close: the turnover/day pairs (e.g., inventory_turnover vs. days_inventory_outstanding) cover conceptually related metrics, and asset_turnover vs. fixed_asset_turnover could initially be confused. The detailed WHEN TO USE guidance does help disambiguate, so misselection risk is low but not zero.

Naming Consistency5/5

All tool names follow the exact same calculate_<metric> pattern, making the set highly predictable and easy to scan. There are no mixed conventions, position variations, or inconsistent verb forms.

Tool Count5/5

Nine tools is a well-scoped size for a financial efficiency calculation server. Each tool corresponds to a standard, distinct efficiency ratio, and none feel redundant or unnecessary.

Completeness4/5

The set covers the core efficiency ratio family comprehensively: asset, fixed asset, inventory, receivable, and payable turnover, plus their days-based counterparts and the cash conversion cycle. Minor gaps remain, such as no direct working-capital-turnover or operating-cycle calculator, but agents can assemble those from the existing outputs.

Resources