Skip to main content
Glama

Calculate Proration

calculate_proration
Read-onlyIdempotent

Prorate a mid-period plan change (upgrade, downgrade, seat change): credit for the unused part of the old plan, charge for the rest of the period on the new plan, and the net amount. Method "months" (default) counts every whole month of the period equally and splits only the partial month by its own days; "days" spreads the price over every day of the period (Stripe default). Monthly plans give the same answer either way. Same math as revexos.com/proration-calculator.

Input Schema

NameRequiredDescriptionDefault
cycleYesBilling period length.
methodNo"months" (default) or "days".
new_priceYesPrice per unit of the new plan for one full period.
old_priceYesPrice per unit of the current plan for one full period.
change_dateYesDate the change takes effect, YYYY-MM-DD. Must fall inside the period.
new_quantityNoUnits/seats on the new plan. Default 1.
old_quantityNoUnits/seats on the current plan. Default 1.
period_startYesStart date of the current billing period, YYYY-MM-DD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered. The description adds context about calculation methods and references an external calculator, which is useful, but it doesn't disclose API-specific behavior, rate limits, or error conditions beyond what annotations provide. A 3 is appropriate given the lower bar with annotations.

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?

The description is front-loaded with the core purpose in the first clause, then moves to output and method details. It is efficient but includes a reference to an external website that may not be necessary for an agent and slightly dilutes conciseness.

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?

Given the tool's complexity (8 parameters, financial calculations) and the absence of an output schema, the description does a good job of explaining the calculation outputs and method differences. It is nearly complete, lacking only explicit guidance on parameter constraints (e.g., change_date must fall within period) which the schema already covers.

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 coverage is 100%, so the schema already documents all parameters in detail. The description clarifies the 'months' vs 'days' method distinction beyond the schema's terse enum documentation, adding some semantic value, but it does not explain the quantity parameters or the cycle parameter further. Baseline 3 is correct when schema does the heavy lifting.

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?

The description states a specific verb and resource ('Prorate a mid-period plan change') and names the exact scenarios it covers (upgrade, downgrade, seat change). It also enumerates the three outputs (credit, charge, net amount), which no sibling tool produces, making it clearly distinguishable.

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

Usage Guidelines3/5

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

The description implies the context (mid-period plan changes, upgrades/downgrades/seat changes) but does not explicitly state when to use this tool versus alternatives like calculate_invoice_due_date or build_revrec_schedule. No exclusions or prerequisites are mentioned, so the guidance is only implied.

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