Skip to main content
Glama

Compare Semver

compare_semver
Read-onlyIdempotent

Compare two semver strings. Returns -1 (a<b), 0 (equal), or 1 (a>b), honoring prerelease precedence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesFirst version.
bYesSecond version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "a": "1.2.3",
      +    "b": "1.2.4"
      +  },
      +  {
      +    "a": "2.0.0-beta",
      +    "b": "2.0.0"
      +  }
      +]
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, non-destructive behavior. The description adds the behavioral nuance of honoring prerelease precedence, which is not covered by annotations.

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?

Single sentence that is front-loaded with the verb 'Compare' and the resource, with no wasted words. It efficiently conveys purpose and behavioral details.

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?

For a simple comparison tool with clear annotations and no output schema, the description is complete: it defines inputs, outputs, and special behavior (prerelease precedence). No gaps.

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?

The input schema covers both parameters with minimal descriptions ('First version.', 'Second version.'). The description does not add additional detail beyond what the schema provides, and schema coverage is 100%, baseline is 3.

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 description clearly states the tool compares two semver strings and specifies the return values (-1, 0, 1) and that it honors prerelease precedence. This distinguishes it from siblings like parse_semver and satisfies_range.

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 description implies usage for comparing version strings, but does not explicitly guide when to use this tool versus siblings like satisfies_range or parse_semver. No exclusion criteria or alternatives are mentioned.

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.