Skip to main content
Glama

cf_warmup

Read-onlyIdempotent

Pre-warm a provider's prefix cache before a long-context request: build a minimal placeholder prompt from a frozen session prefix or fragments, then send the returned prompt once to establish it.

Instructions

预热工具(v0.2.1):在正式请求前显式调用一次,用当前冻结前缀(sessionId)或传入片段构造最小占位请求;客户端需将返回的 prompt 发一次 LLM 请求以触发厂商前缀缓存建立。注意:必须显式调用、默认不自动触发;该占位请求本身会产生少量计费(按未命中计价系数);命中率无法由 server 侧确认,请以下一次请求的 usage 为准。【何时调】确认紧接着会有一次长上下文请求、想先把厂商缓存建立起来时;日常短任务不要调(占位请求本身也要计费)。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cf_warmup"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo占位请求文本(默认固定占位符)
align128No128-token 对齐开关(默认开启)
fragmentsNo无冻结前缀时用于构造候选前缀的分级片段
sessionIdNo会话标识;存在冻结前缀时基于冻结前缀构造占位请求
minPrefixTokensNo最小有效前缀长度门槛(token),默认 200;必须 ≥ 0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.2

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the call must be made explicitly and is not auto-triggered, that the placeholder request incurs a small charge billed at the cache-miss coefficient, and that cache hit success cannot be verified server-side so the caller must check usage on the next request. It also specifies the required follow-up action (the client must send the returned prompt to the LLM once for the cache to actually be built). readOnlyHint=true remains consistent since no server state is mutated.

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?

Front-loaded with the core action, then caveats, then a bracketed when-to-call block, so an agent can stop reading early and still act. Dense but every clause carries operational meaning. The version tag '(v0.2.1)' is the only piece of pure noise.

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?

For a 5-parameter, all-optional, no-output-schema tool, the description covers what it produces (a prompt the client must forward), the cost side effect, the manual-trigger requirement, and the limits of verification. Nothing an agent needs in order to invoke it correctly is missing.

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 baseline is 3, but the description adds relational meaning the schema cannot: sessionId is the path taken when a frozen prefix exists, while fragments are the fallback for constructing a candidate prefix when none exists. It does not explain align128 or minPrefixTokens, though those are adequately documented inline in the schema.

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?

The description states a specific verb and resource: explicitly pre-warm the vendor prefix cache by constructing a minimal placeholder request from the frozen prefix (sessionId) or supplied fragments. It is clearly not a general query or mutation tool. It does not, however, name or differentiate itself from siblings such as cf_inject or cf_normalize, which plausibly compete for the same 'build the prefix' scenario.

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?

Contains an explicit when-to-call bracket (only when a long-context request is imminent and you want the vendor cache established first) and an explicit when-not (do not call for everyday short tasks, because the placeholder itself is billed). The only gap is that no alternative tool is named for the cases where this is the wrong choice.

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