Skip to main content
Glama

Agent Data Tools: Utilities

Semver compare, version check: compare two version numbers and say which is newer

semver
Read-only

Semver compare of two semantic versions (1.2.3, pre-releases like 2.0.0-rc.1 handled by the SemVer rules): 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 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "semver"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesFirst version
bYesSecond version

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the description's 'reads or computes only and changes nothing' is largely redundant. It earns its keep by disclosing what annotations cannot: pricing ($0.01/call via x402 USDC or card key), the first 10 calls free, failed calls free, and that repeats are charged — reconciling the non-idempotent hint as a cost property rather than a state change.

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 core comparison semantics, then the derived-value behavior, then usage, then commercial terms. Every sentence carries information an agent needs — even the pricing sentence affects whether it retries a failed call or builds a batch.

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?

For a 2-parameter pure-function tool with no output schema, the description covers inputs, output contents, SemVer edge cases and cost. The only soft spot is that the exact response shape (boolean vs. version string vs. both for the winner) is described in prose rather than precisely.

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 description adds real meaning: the example pair shows accepted version syntax and ordering (1.10.0 > 1.9.3), and phrasing 'the next major, minor and patch versions of the first' tells the agent that parameter a, not b, drives the derived versions.

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 ('Semver compare of two semantic versions') and enumerates exactly what it returns: which of the two 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 an agent knows the SemVer edge case is covered.

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 concrete decision context ('Use to decide whether an upgrade is a major change') and a worked input pair (a=1.10.0, b=1.9.3). It does not name any exclusion or alternative tool, but for a self-contained comparison primitive that limitation is minor.

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