Skip to main content
Glama

pin_safe

Read-onlyIdempotent

Pin dependencies to the highest patched version below a chosen CVE severity tier, respecting a semver constraint. Outputs recommended version and an audit trail of the resolution.

Instructions

Highest version below the chosen CVE severity tier, respecting a semver constraint. USE WHEN: writing a package.json/requirements.txt line; resolving dependabot by lowest-risk patched version. RETURNS: {recommended_version, walk_log[]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ecosystemYes
packageYes
min_severityNoLowest severity to exclude. Default: high (excludes critical+high).
constraintNonpm-style constraint: ^X.Y.Z, ~X.Y.Z, >=X.Y.Z, or exact X.Y.Z.
include_prereleaseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Description discloses the selection logic (highest version below severity tier) and return format (recommended_version, walk_log), adding value beyond the read-only/idempotent annotations. The walk_log implementation detail is a distinctive behavioral disclosure. However, it doesn't specify edge cases like no safe version found.

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 concise sentences, front-loaded with the core action, followed by usage cues and return shape. No extraneous content.

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?

The tool has 5 parameters and no output schema, but the description provides the return shape and core algorithm. It lacks details on include_prerelease behavior and error conditions, but is sufficient for typical use. Given the annotations and sibling context, it's fairly complete.

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 covers only 40% of parameters, so the description must compensate. It adds semantics for constraint (semver) and severity tier (matching min_severity), but leaves package, ecosystem, and include_prerelease to the schema. Partial compensation only, so a 3 is appropriate.

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?

Clearly states the tool's function: selecting the highest version below a CVE severity threshold while honoring semver constraints. This distinguishes it from siblings like get_latest_version (no severity filter) and get_vulnerabilities (just lists vulnerabilities).

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?

Provides explicit USE WHEN guidance for package manifest updates and dependabot resolution. Does not name alternatives or state when not to use, but the context is clear.

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