Skip to main content
Glama

Comparar versiones semánticas

semver-compare
Read-onlyIdempotent

Compara dos versiones SemVer con las reglas de precedencia: devuelve -1, 0 o 1 y el nivel de diferencia. Cuándo: hay que leer, construir o revisar con exactitud una URL, una cabecera HTTP, un token, una versión, un rango de IP, un documento HTML o Markdown o un archivo para agentes. No para: incrementar una versión SemVer (semver-bump). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Compares two SemVer versions with full precedence rules (prereleases sort before releases; build metadata ignored): returns -1, 0 or 1 and the difference level. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. Not for: incrementing a SemVer version (semver-bump). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
aYesSemantic version, e.g. 1.2.3-beta.1 (string; required; up to 256 chars).
bYesSemantic version, e.g. 1.2.3-beta.1 (string; required; up to 256 chars).

Output Schema

NameRequiredDescriptionDefault
resultNoany JSON value
relationNo
differenceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / a / examples
      Added value: +[
      +  "1.0.0-alpha"
      +]
    • addedInput schema / properties / b / examples
      Added value: +[
      +  "1.0.0"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Compares two SemVer versions with full precedence rules (prereleases sort before releases; build metadata ignored): returns -1, 0 or 1 and the difference level. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. Not for: incrementing a SemVer version (semver-bump). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuine extra context beyond them: no network access, no stored state, determinism, and concrete limits (64 KB input, 1 s per call, 1 MB result), which is exactly the operational detail annotations cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core is front-loaded and tight, but the same content is duplicated in Spanish and English, and the 'Cuándo' sentence lists unrelated artifacts (URLs, HTTP headers, IP ranges, HTML/Markdown files) that a version comparison never touches — boilerplate that dilutes the signal.

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?

With an output schema, full schema coverage and rich annotations, the description supplies what is missing: precedence rules, determinism, and resource limits. The only weakness is the generic applicability list, which could wrongly suggest the tool parses URLs or HTML.

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% with examples and maxLength, so the baseline is 3. The description goes slightly beyond by explaining how the inputs are interpreted — prerelease ordering and that build metadata is ignored — which changes what values in 'a' and 'b' actually mean for the comparison.

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 ('compara dos versiones SemVer'), the exact precedence semantics (prereleases before releases, build metadata ignored), and the return contract (-1, 0 or 1 plus difference level). An agent knows precisely what this does without opening the 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?

Explicitly excludes the closest confusable action: 'No para: incrementar una versión SemVer (semver-bump)'. However, it never mentions the equally adjacent siblings semver-satisfies and semver-sort, and the generic 'Cuándo' list (URLs, HTTP headers, tokens, IP ranges, HTML) does not help select among them.

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