pin_safe
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[]}.
This record as markdown: /tools/dev-depscope-mcp/pin-safe.md
What pin_safe does on Depscope
AI agents use pin_safe to create or update resources in Depscope, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Depscope environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
package | string | Yes | |
ecosystem | string | Yes | |
constraint | string | — | npm-style constraint: ^X.Y.Z, ~X.Y.Z, >=X.Y.Z, or exact X.Y.Z. |
min_severity | string | — | Lowest severity to exclude. Default: high (excludes critical+high). |
include_prerelease | boolean | — |
Parameters from the server's own tool schema.
Why pin_safe is rated Medium
The tool reads package metadata to recommend safe versions, but its stated USE WHEN indicates it's meant to update package dependency files—a write operation. This is reversible (dependencies can be updated again), poses low risk (changing to a safer package version is a beneficial modification), and has minimal blast radius even if misused.
From the tool's definition Tool is explicitly for "writing a package.json/requirements.txt line" and "resolving dependabot", which involves modifying dependency specifications. Returns a recommended version to be written into package configuration files.
Attacks that exploit this kind of access
The rule that runs pin_safe safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Depscope, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For pin_safe, this is the rule to start with:
pin_safe stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Depscope, apply this rule, and every pin_safe call is checked against it from then on.
Questions about pin_safe
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[]}. It is categorised as a Write tool in the Depscope MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
pin_safe accepts 5 parameters: package, ecosystem, constraint, min_severity, include_prerelease. Required: package, ecosystem. The full parameter table on this page comes from the server's own tool schema.
Register the Depscope MCP server in PolicyLayer and add a rule for pin_safe: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Depscope. Nothing to install.
pin_safe is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the pin_safe rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for pin_safe. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
pin_safe is provided by the Depscope MCP server (cuttalo/depscope-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Depscope, and thousands of servers like it.
This server
Across the catalogue