Skip to main content
Glama

Ordenar versiones

semver-sort
Read-onlyIdempotent

Ordena versiones SemVer por precedencia y opcionalmente devuelve la mayor que cumple un rango. 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: comparar dos versiones SemVer con las reglas de precedencia (semver-compare). 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: Sorts a list of SemVer versions by precedence (ascending or descending), reports invalid entries, and optionally returns the highest version satisfying a range. 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: comparing two SemVer versions with full precedence rules (semver-compare). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
orderNoOrder (optional; one of: asc, desc; default "asc").asc
rangeNoRange for max_satisfying (string; optional; up to 512 chars).
versionsYesVersions (array of string; required; at least 1 items; up to 5000 items).

Output Schema

NameRequiredDescriptionDefault
sortedNo
invalidNo
max_satisfyingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / versions / examples
      Added value: +[
      +  [
      +    "1.10.0",
      +    "1.2.0",
      +    "1.2.0-rc.1",
      +    "bad",
      +    "2.0.0"
      +  ]
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Sorts a list of SemVer versions by precedence (ascending or descending), reports invalid entries, and optionally returns the highest version satisfying a range. 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: comparing two SemVer versions with full precedence rules (semver-compare). 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.1/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive and closed-world, but the description adds real context beyond them: deterministic output, explicit limits (64 KB input, 1 s per call, 1 MB result), and the fact that invalid entries are reported rather than rejected. The translated duplicate of the same text adds no extra disclosure.

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 purpose is front-loaded and crisp, but the definition is bloated by a generic 'When:' catalogue of unrelated artifact types and by a near-verbatim EN duplicate of the ES text, both of which dilute the signal.

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 an output schema present, 100% schema description coverage and rich annotations, the description only needs to add scoping and operational limits — which it does via the exclusion, the determinism claim and the size/time limits.

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 the baseline is 3, but the description adds meaning the schema does not: it explains that the `range` parameter drives the optional 'highest satisfying version' output, which the schema only labels as 'Range for max_satisfying'.

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?

The opening sentence states a specific verb and resource: sorts SemVer versions by precedence and optionally returns the highest version satisfying a range. It also names the sibling it is not (semver-compare), so an agent can distinguish it without opening a schema.

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?

The explicit 'Not for: comparing two versions (semver-compare)' exclusion is genuinely useful routing. However, the 'When:' clause is boilerplate listing URLs, HTTP headers, tokens, IP ranges and HTML/Markdown documents, none of which is a SemVer sorting task, and it never mentions the more relevant siblings semver-satisfies, semver-parse or semver-bump.

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