Skip to main content
Glama

semver_compare

Read-onlyIdempotent

Compare two semantic version strings and return whether the first is greater than, less than, or equal to the second for version ordering and compatibility checks.

Instructions

Compare two semantic versions (returns greater, less, or equal).

Input Schema

NameRequiredDescriptionDefault
version_aYesFirst version.
version_bYesSecond version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish the safe read-only, idempotent nature of the operation. The description adds useful behavioral detail by specifying the comparison result set ('greater, less, or equal'), though it does not mention invalid-version error behavior or prerelease handling.

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?

The entire definition is a single front-loaded sentence with no wasted text. It states the action and the result efficiently.

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 simple two-parameter comparison tool with full schema coverage, annotations, and no output schema, the description provides the essential purpose and return semantics. It is only slightly incomplete regarding invalid inputs and semantic-version edge cases.

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 coverage is 100%, so the two parameters are already documented in the input schema. The description only reiterates that two semantic versions are compared and adds no syntactic or format detail beyond the schema baseline.

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?

The description uses a specific verb ('Compare') and resource ('two semantic versions') and even states the return result. It is clearly distinct from sibling semver_parse, though it does not explicitly name that sibling as an alternative.

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 by the purpose: use this tool when two semantic versions need comparison. There is no explicit guidance on when not to use it, prerequisites, or how it relates to alternatives like semver_parse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools