Skip to main content
Glama

cache_align_prompt

Aligns prompt boundaries to provider KV cache page grids and evaluates break-even costs to decide whether freezing a warm prefix is cheaper than re-compression.

Instructions

PAC-KV prompt alignment and economic break-even gating.

Quantizes prompt boundary to provider KV cache page grid (Anthropic 1024, OpenAI 128, DeepSeek 64, vLLM 16, SGLang 32) and evaluates whether freezing warm prefix is cheaper than re-compression. Returns aligned text and PACReceipt.

Input Schema

NameRequiredDescriptionDefault
prefixYes
providerNogeneric
client_keyYes
dynamic_tailYes
target_budgetNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.67

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the operational model (page-grid quantization per provider, break-even comparison of freezing vs re-compression) and that it returns aligned text plus a receipt, but omits side-effect/read-only status, permission needs, and error behavior for a transformation that could affect caching.

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?

Three dense sentences, front-loaded with the core action before the supporting provider list and return statement. Efficient, though the provider enumeration occupies meaningful space that could have gone to parameter meaning.

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?

Output schema exists so return values needn't be spelled out, and the description covers the 'what' and 'why'. However, for a 5-parameter, 0%-covered, annotation-free tool, the absence of any parameter explanation leaves a real completeness gap for correct invocation.

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?

All 5 parameters have 0% schema description coverage, so the description must compensate. It hints at 'prefix', 'provider' (via the page-size list), and a cost notion ('target_budget'), but never names or explains client_key, dynamic_tail, or target_budget, leaving most parameters semantically undefined.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb-and-resource: it quantizes a prompt boundary to a provider's KV cache page grid and evaluates break-even economics, naming concrete providers and page sizes. This is far from tautology, but the heavy jargon ('PAC-KV', 'PACReceipt') and lack of differentiation from any of the many context/compression siblings keeps it below a 5.

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

Usage Guidelines2/5

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

The description explains what the tool does but never says when to call it versus the many adjacent tools (optimize_context, compress_shell, create_context_receipt). No preconditions, exclusions, or alternative-routing guidance are provided.

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

Deploy Server

Other Tools