Skip to main content
Glama

Compare semantic versions: compare two version numbers and say which is newer

semver
Read-only

Compare two semantic versions (1.2.3, pre-releases like 2.0.0-rc.1 handled by the SemVer rules) and get which is newer, plus the next major, minor and patch versions of the first. Use to decide whether an upgrade is a major change. Example: a=1.10.0, b=1.9.3. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
aYesFirst version
bYesSecond version

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/not-destructive, but the description adds genuinely new context: per-call pricing, first 25 free, failed calls free, and the crucial clarification that 'each call is charged, so repeats are not free', which explains why idempotentHint is false. It does not describe the return shape beyond naming the values, keeping it from a 5.

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 core comparison, then the bonus outputs, then the example, then pricing. Every sentence carries information, though the pricing clause is verbose ('Price $0.01/call via x402 USDC or a card key (/credits)') and could be tightened.

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?

No output schema exists, so the description must convey the return values, and it does name all four outputs. It stops short of specifying the exact result format (e.g., a comparison sign or structured object), which is a minor residual gap for a two-param utility.

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?

Schema coverage is 100%, so baseline is 3, but the worked example (a=1.10.0, b=1.9.3) and the phrase 'next ... versions of the first' clarify that the derived versions are computed from parameter a specifically — meaning the schema alone does not supply.

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 ('Compare two semantic versions') and goes further to specify the exact output: which is newer plus the next major, minor and patch versions of the first. Pre-release handling (2.0.0-rc.1) is called out, so the agent knows this is full SemVer, not naive string comparison.

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 a clear use case — 'Use to decide whether an upgrade is a major change' — and a worked example (a=1.10.0, b=1.9.3) that illustrates the non-obvious numeric ordering. No explicit when-not or alternative tools are named, so it falls short of a 5.

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.