Skip to main content
Glama

Pin version

layerz_pin_version
Idempotent

Pin a version so it stays listed, diffable and restorable beyond the plan history window (a validated budget, a closing, the version sent to an investor). pinned: false unpins it and frees the slot. Identify the target with exactly one of { revision_id } (preferred — stable sha256 from layerz_history), { version_number }, or { id } (raw row UUID). Pins are capped per plan (max_pinned_versions in layerz_history, null = unlimited); pinning past the cap fails with a 403 naming the limit — unpin another version first. Pinning an already-pinned version is a no-op. Returns { ok, version_id, version_number, revision_id, pinned, pinned_count, max_pinned_versions }. Mutating — not available for read-only API keys. Requires write access; the target must be inside the plan history window or already pinned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pinnedNotrue (default) pins the version, false unpins it and frees its slot.
versionYesVersion to pin or unpin. Exactly one of revision_id / version_number / id.
model_idNoTarget model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false. The description adds meaningful behavioral context: pinning past the cap fails with a 403 naming the limit, pinning an already-pinned version is a no-op, unpinning frees a slot, and the tool is mutating and unavailable for read-only keys. No contradiction with annotations.

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?

The description is dense but well-organized: purpose first, then identifier selection, then cap behavior, then return value, then access requirements. Every sentence adds information. Slightly long, but each clause earns its place given the tool's complexity.

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?

The description covers purpose, identifier selection, cap behavior, error semantics, return value, and access requirements. There is no output schema, so the explicit return shape { ok, version_id, ... } is valuable. For a mutating tool with nested parameters, this is complete.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already documents all parameters. The description adds value by explaining the preferred identifier (revision_id, stable sha256), the 'exactly one of' constraint, and the meaning of pinned: false. It doesn't add syntax details beyond the schema, but the schema is already rich.

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?

The description states a specific verb ('Pin') and resource ('a version'), and explains the purpose: keeping it listed, diffable, and restorable beyond the plan history window. It also covers the unpin case, which distinguishes it from sibling tools like layerz_restore_version and layerz_history.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use this tool (pin a version for retention beyond the history window) and gives concrete exclusions: not available for read-only API keys, requires write access, target must be inside the plan history window or already pinned. It also names the cap behavior and the alternative action (unpin another version first).

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