Skip to main content
Glama

Safe version per release line

latest_safe
Read-onlyIdempotent

Find the version to upgrade to for one npm package. Returns, per release line (major, or minor for 0.x), the version that fixes every known advisory of the last 120 days; a line still affected has safe: null and the ids that keep it affected; a line hit with no fix of its own (14.x when only 15.x is fixed) has safe: null and upgrade_to, the lowest safe version above it. Also lists advisories with no fix found, and says whether this package name itself is flagged as malicious. Use it after get_advisories, to pick one target version per line.

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": {
      "package": "<package>"
    },
    "name": "latest_safe"
  }
}

Input Schema

NameRequiredDescriptionDefault
packageYesOne npm package name as written in package.json, for example "next" or "@solana/web3.js".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / package / description
      Added value: +"One npm package name as written in package.json, for example \"next\" or \"@solana/web3.js\"."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare a safe read-only idempotent operation, so the description spends its budget on non-obvious behavior instead: a 120-day advisory window, the meaning of safe: null in two distinct cases, the upgrade_to fallback for unfixed lower lines, and a malicious-package flag. These are hidden constraints and return semantics an agent could not infer from structured fields.

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

Conciseness4/5

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

Purpose is front-loaded and nearly every clause carries information about distinct output cases. It is dense to the point of being one long chain of parentheticals, which costs a little readability, but there is no filler sentence to cut.

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?

There is no output schema, so the description bears the burden of explaining return values — and it does, covering safe, upgrade_to, the advisory id list, unfixed advisories, and the malicious flag. Combined with annotations covering safety, an agent has what it needs to call and interpret this correctly.

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?

Only one parameter and the schema already documents it at 100% coverage, including the package.json format and examples. The description adds nothing about the name (e.g., scoped names, casing) beyond what the schema states, so the baseline of 3 applies.

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 ('Find the version to upgrade to for one npm package') and immediately frames the output per release line, which no sibling does. An agent can distinguish it from get_advisories/get_advisory purely from this sentence.

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 sequences itself relative to a sibling: 'Use it after get_advisories, to pick one target version per line.' That gives ordering and intent, though it stops short of stating when to skip this tool or what get_advisories alone suffices for.

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