# 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[]}.

Agent View of the PolicyLayer registry record for `pin_safe`. HTML page: https://policylayer.com/tools/dev-depscope-mcp/pin-safe

## Facts

- Tool: `pin_safe`
- Server: Depscope (`cuttalo/depscope-mcp`) — https://policylayer.com/tools/dev-depscope-mcp.md
- Homepage: https://github.com/cuttalo/depscope-mcp
- Risk category: Write (Medium risk)
- Registry record: grade D, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 5 (2 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `package` | string | yes |  |
| `ecosystem` | string | yes |  |
| `constraint` | string | no | npm-style constraint: ^X.Y.Z, ~X.Y.Z, >=X.Y.Z, or exact X.Y.Z. |
| `min_severity` | string | no | Lowest severity to exclude. Default: high (excludes critical+high). |
| `include_prerelease` | boolean | no |  |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pin_safe",
    "arguments": {
      "package": "<package>",
      "ecosystem": "<ecosystem>"
    }
  }
}
```

## 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 own 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."

## Use case

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.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Depscope:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "pin_safe": {
      "limits": [
        {
          "counter": "pin_safe_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Depscope (21)

- `check_bulk` — Read — https://policylayer.com/tools/dev-depscope-mcp/check-bulk.md
- `check_compatibility` — Read — https://policylayer.com/tools/dev-depscope-mcp/check-compatibility.md
- `check_malicious` — Read — https://policylayer.com/tools/dev-depscope-mcp/check-malicious.md
- `check_package` — Read — https://policylayer.com/tools/dev-depscope-mcp/check-package.md
- `check_typosquat` — Read — https://policylayer.com/tools/dev-depscope-mcp/check-typosquat.md
- `compare_packages` — Read — https://policylayer.com/tools/dev-depscope-mcp/compare-packages.md
- `find_alternatives` — Read — https://policylayer.com/tools/dev-depscope-mcp/find-alternatives.md
- `get_breaking_changes` — Read — https://policylayer.com/tools/dev-depscope-mcp/get-breaking-changes.md
- `get_health_score` — Read — https://policylayer.com/tools/dev-depscope-mcp/get-health-score.md
- `get_known_bugs` — Read — https://policylayer.com/tools/dev-depscope-mcp/get-known-bugs.md
- `get_latest_version` — Read — https://policylayer.com/tools/dev-depscope-mcp/get-latest-version.md
- `get_migration_path` — Read — https://policylayer.com/tools/dev-depscope-mcp/get-migration-path.md
- `get_package_prompt` — Read — https://policylayer.com/tools/dev-depscope-mcp/get-package-prompt.md
- `get_trending` — Read — https://policylayer.com/tools/dev-depscope-mcp/get-trending.md
- `get_trust_signals` — Read — https://policylayer.com/tools/dev-depscope-mcp/get-trust-signals.md
- `get_vulnerabilities` — Read — https://policylayer.com/tools/dev-depscope-mcp/get-vulnerabilities.md
- `install_command` — Read — https://policylayer.com/tools/dev-depscope-mcp/install-command.md
- `package_exists` — Read — https://policylayer.com/tools/dev-depscope-mcp/package-exists.md
- `resolve_error` — Read — https://policylayer.com/tools/dev-depscope-mcp/resolve-error.md
- `scan_project` — Read — https://policylayer.com/tools/dev-depscope-mcp/scan-project.md
- `contact_depscope` — Write — https://policylayer.com/tools/dev-depscope-mcp/contact-depscope.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=dev-depscope-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/dev-depscope-mcp
