Skip to main content
Glama

semver_compare

Compare two semantic version strings and report which is higher. Pure CPU, instant. Use to gate a dependency bump.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
aYesFirst version
bNoSecond version

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / a
      Added value: +{
      +  "description": "First version",
      +  "type": "string"
      +}
    • addedInput schema / properties / b
      Added value: +{
      +  "description": "Second version",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "a"
      +]
  4. Added

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. 'Pure CPU, instant' usefully discloses that there are no side effects or network calls, but it is silent on important behavioral edge cases: what is returned when the versions are equal, whether prerelease/build metadata follow semver precedence rules, and how invalid version strings are handled.

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?

Three short sentences, zero waste, and the core action is front-loaded before the performance note and the use case. Every sentence adds something an agent can act on.

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?

For a two-parameter pure function with no output schema or annotations, the description is adequate but incomplete: it does not explain the equality case, the return value shape despite the absence of an output schema, or the optionality of 'b'. A little more behavioral detail would round it out.

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 baseline is 3, but the description adds the meaningful constraint that the inputs are 'semantic version strings', implying semver formatting rather than arbitrary text. It does not explain why parameter 'b' is optional or what happens if it is omitted, which is a notable gap given the schema.

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: 'Compare two semantic version strings and report which is higher.' The 'semantic version' qualifier distinguishes it from the generic sibling 'compare' and from 'hash_compare'/'text_diff' without needing to open 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?

Gives a concrete usage context—'Use to gate a dependency bump'—which is enough for an agent to know when this tool applies. It does not name alternatives or state when not to use it (e.g., for arbitrary string comparison, use 'compare'), so it stops short of full routing guidance.

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