Skip to main content
Glama

Duo Data Utilities: IBAN, VAT, ISIN Validation API

Semver parser: parse and compare versions, check range satisfaction

semver_compare
Read-onlyIdempotent

Semver parser and comparator: parse a semantic version into major, minor, patch, prerelease and build parts; compare two versions by precedence including prerelease ordering; or test whether a version satisfies a range expression using caret, tilde, hyphen, x-ranges and comparator sets. Returns the parsed structure, the comparison result and the reason a range did not match. Price: $0.05 per successful call, paid over x402 (USDC on Base).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "semver_compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
aNoFirst version for op=compare. Accepted: at most 256 characters.
bNoSecond version for op=compare. Accepted: at most 256 characters.
opNoparse (default), compare, satisfies or sort. Accepted: parse, compare, satisfies, sort.
rangeNoRange expression for op=satisfies, e.g. ^1.2.0. Accepted: at most 256 characters.
versionNoVersion to parse (op=parse) or test (op=satisfies). Accepted: at most 256 characters.
versionsNoComma-separated versions for op=sort, at most 100. Accepted: at most 100 versions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so safety is covered. The description adds genuinely non-derivable context: it discloses return content (parsed structure, comparison result, and the reason a range did not match) and, importantly, a cost model of $0.05 per successful call paid via x402 in USDC on Base — an agent needs this before invoking. It does not cover failure behavior for invalid version strings or whether failed calls are billed.

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 three capabilities are front-loaded in a single dense sentence, followed by return values and pricing — a sensible order with no filler. It is on the long side for one paragraph, and the pricing sentence, while necessary, is appended rather than integrated. Nothing is redundant enough to cut outright.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With six parameters, four operations and no output schema, the description does well to describe return values and payment. The significant hole is op=sort, which exists in the enum with its own `versions` parameter but is entirely absent from the description and the title, leaving one of four modes undocumented. Error behavior for malformed versions is also unaddressed.

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 every parameter is already documented in the schema, and the description mostly restates the same op-to-parameter mapping. It does add some meaning for `range` by enumerating supported range syntaxes (caret, tilde, hyphen, x-ranges, comparator sets) and for comparison by noting prerelease ordering, but it never explains the `versions` sort input. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb set and resource: parse a semantic version into major/minor/patch/prerelease/build, compare two versions by precedence, and test range satisfaction. The scope is clear enough to distinguish it from any sibling (none of the listed siblings handle versions). It falls short of a 5 because the schema's fourth operation, op=sort, is never mentioned in the description.

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?

Usage is implied through per-operation parameter mapping ("First version for op=compare", "Range expression for op=satisfies"), which tells an agent how to drive each mode. However, there is no explicit when-to-use/when-not guidance, no statement about which op is the default beyond the schema's "parse (default)", and no routing to any alternative. Adequate but with clear gaps.

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.