Skip to main content
Glama

Calculate plan change

calculate_plan_change
Read-only

Preview a plan change without payment: calculate unused value against new plan price and return both expiration dates so customers see if expiry moves earlier or later.

Instructions

Preview a plan change. No payment is taken: the unused value of the current plan is converted at the new plan's price, so an upgrade moves the expiry EARLIER and a downgrade moves it later. Returns expirationDate, currentExpirationDate, expirationChangeDays (negative = shorter) and paymentRequired=false; show the customer both dates. Use get_plan_resources first to see available resource IDs for the target plan. Requires services:read when called with an API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
planYesPlan ID from get_plan_options
orderNoYesTenant-owned service order number: 1-64 ASCII letters, digits or hyphens, e.g. VP12345 or VP12345-1
resourcesYesArray of numeric resource value IDs — one per resource type (RAM, SSD, IP, etc.). Get IDs from get_plan_resources response: each resource type has 'values' array, pick one value's 'id' per type. A type left out keeps its current value; an id the target plan does not offer is refused with 422 invalidResources.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.3.16

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false), and the description adds real behavioral context beyond them: the conversion arithmetic, that upgrades move expiry EARLIER while downgrades move it later, that paymentRequired=false, and the required permission scope. This is unusually rich disclosure for a read-only tool.

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?

Front-loaded with the purpose, then value/semantics, then return fields, then the prerequisite, then auth. Every sentence carries distinct information — no restatement of the name or filler — despite being a single dense paragraph.

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?

With no output schema, the description compensates by naming the exact returned fields (expirationDate, currentExpirationDate, expirationChangeDays with sign convention, paymentRequired) and telling the agent to surface both dates to the customer. Combined with 100% param coverage and read-only annotations, nothing needed to call 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 schema already documents orderNo format, plan ID sourcing, and the resources array semantics in detail. The description's only added param signal is the get_plan_resources pointer for resource IDs, which largely duplicates the schema, so the baseline 3 applies.

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 ('Preview a plan change') and immediately disambiguates it from the actual-change siblings (change_plan) by emphasizing 'No payment is taken' and the preview output. An agent can tell this is a read-only estimator rather than a mutation without opening any schema.

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?

Gives explicit ordering guidance ('Use get_plan_resources first to see available resource IDs for the target plan') and states the auth scope ('Requires services:read when called with an API key'). It stops short of naming change_plan as the alternative when the customer actually wants to apply the change, so the when-not is only implied by 'Preview'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools