Skip to main content
Glama

Pin MCP tool definitions

pin_tools
Idempotent

Records SHA-256 hashes of selected MCP server tool definitions to detect rug pulls in later audits; run after reviewing an audit report.

Instructions

Records a SHA-256 hash of every tool definition of the selected servers in ~/.claude/mcp-security/pins.json, so later audits can detect rug pulls. Pin only after the user has reviewed an audit_server_tools report for these servers. Launches the servers like audit_server_tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serversYesServer names to scan, optionally as "scope:name" (e.g. "project:github"). Use ["*"] for all.
project_dirNo
confirm_launchYesMust be true. Scanning starts each server process (stdio) or connects to it (HTTP); only initialize and tools/list are sent and no tool is called. Ask the user first.
timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, idempotentHint=true, openWorldHint=true; the description explains *why* it is a non-read operation — it launches/connects to each server and writes a hash file — plus a user-consent precondition. It stops short of describing failure modes (unreachable server, existing pin mismatch) or whether a prior pin is overwritten.

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 tight sentences: what gets written and where, the rug-pull rationale, the ordering prerequisite, and the launch behavior. The critical gating instruction is front-loaded and nothing is padded.

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 state-mutating, process-launching tool with no output schema and half its parameters undocumented, the description covers intent and precondition adequately but omits return/results reporting and error behavior. An agent would need to guess what it gets back after pinning.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 50%, with project_dir and timeout_seconds carrying no schema description, and the tool description says nothing about these or about the servers wildcard syntax. The description therefore adds no parameter meaning and does not compensate for the coverage gap.

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?

Names a specific verb and resource ('Records a SHA-256 hash of every tool definition of the selected servers') and states the artifact written (~/.claude/mcp-security/pins.json) plus the rationale ('so later audits can detect rug pulls'). It also positions itself relative to the sibling audit_server_tools, so an agent can distinguish it from audit/report tools.

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?

Explicit prerequisite: 'Pin only after the user has reviewed an audit_server_tools report for these servers,' which names the alternative tool and the condition that gates use. It does not spell out when *not* to use it (e.g. re-pinning after config changes) or how it differs in scope from apply_fixes, but the routing signal is clear.

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