Skip to main content
Glama

calculate_operating_cycle

Read-onlyIdempotent

Calculate the operating cycle: days inventory outstanding plus days sales outstanding — the total number of days from purchasing inventory to collecting cash from customers. Formula: Operating Cycle = Days Inventory Outstanding + Days Sales Outstanding. WHEN TO USE: Use to measure the full cash-to-cash duration of operations before supplier terms are considered; shorter cycles free up cash faster. WHEN NOT TO USE: Do NOT use unless DIO and DSO are computed on a consistent 365-day basis; for the net (supplier-financed) view use calculate_cash_conversion_cycle. 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 { operating_cycle: number (e.g. 106.4 days), inputs }. PARAMETERS: dio (required): Days inventory outstanding, e.g. 60.8. dso (required): Days sales outstanding, e.g. 45.6.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dioYesDays inventory outstanding, e.g. 60.8.
dsoYesDays sales outstanding, e.g. 45.6.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

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, non-destructive, and closed-world, so the safety profile is covered. The description goes beyond them by disclosing error behavior (division by zero or non-finite inputs returns an explicit error) and confirming determinism/no side effects, though it adds little on response shape beyond the RETURNS line.

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?

Front-loaded with the definition and formula, and the labeled sections (WHEN TO USE / WHEN NOT TO USE / BEHAVIOUR / RETURNS / PARAMETERS) make it scannable. Slightly redundant in restating the formula in prose and again as an equation, but almost every sentence carries useful 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?

For a two-parameter pure calculation with no output schema, the description covers formula, units, error conditions, determinism, and even the return shape ({operating_cycle, inputs}). Nothing needed to invoke it correctly is missing.

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 100%, so the baseline is 3. The description's PARAMETERS section merely restates the two schema descriptions with the same examples (dio 60.8, dso 45.6) and adds no units, ranges, or constraints beyond what the schema already says.

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 the operating cycle'), spells out the exact formula and inputs, and explicitly positions it against the sibling calculate_cash_conversion_cycle. An agent can distinguish it from the other cycle/turnover calculators without opening a schema.

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?

Provides explicit WHEN TO USE ('full cash-to-cash duration before supplier terms') and WHEN NOT TO USE ('unless DIO and DSO are on a consistent 365-day basis'), and names the alternative tool for the net/supplier-financed view. Both the condition and the substitute are stated.

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