Skip to main content
Glama

cf_tier

Read-onlyIdempotent

Grades candidate memory fragments A/B/C and fills a character budget from highest to lowest value to decide which fragments to admit and which to discard.

Instructions

对候选记忆/上下文片段做价值分级准入:提纯去噪 → A/B/C 分级 → 按预算从高到低填充,输出准入列表与丢弃明细。【何时调】候选片段超出预算、需要决定「留哪些、丢哪些」时;片段很少(不足 5 条)可直接注入,不必先分级。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fragments": "<fragments>"
    },
    "name": "cf_tier"
  }
}

Input Schema

NameRequiredDescriptionDefault
nowNo用于测试的当前时间戳(毫秒),必须 ≥ 0
queryNo用于评分的当前请求
fragmentsYes候选片段列表
totalCharsNo总预算(字符),默认 800;必须 ≥ 0(填 0 表示不赋予预算,全部片段都会被丢弃)
reservedCharsNo预留前缀字符数,默认 250;必须 ≥ 0,且不应大于 totalChars(否则预算被预留吃光,什么都不会被准入)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.2

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, and the description is consistent with that purely computational profile. Beyond the annotations it contributes the processing order and the fact that a budget governs admission, but it says nothing about scoring heuristics, tie-breaking, or the shape of the returned discard details — which matters since there is no output schema.

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?

Purpose and pipeline are front-loaded in the first sentence, with usage conditions bracketed after it. Dense but waste-free; the arrow notation keeps the multi-stage flow compact.

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?

Five parameters with full schema coverage, no output schema, and rich annotations mean the remaining burden is process explanation, which the description supplies in full (stages, ordering, budget behavior, and both outputs). An agent has everything needed to decide whether to call it and with which budget values.

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

Parameters3/5

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

Schema description coverage is 100%, including the crucial edge cases (totalChars=0 discards everything, reservedChars should not exceed totalChars), so the schema already does the heavy lifting. The description adds only the notion that filling proceeds from highest value downward against the budget, which is a modest supplement rather than new parameter-level meaning.

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 names a specific operation on a specific resource — value-tier admission of candidate memory/context fragments — and lays out the pipeline (denoise → A/B/C tiering → budget fill) plus the outputs (admission list and discard details). It distinguishes itself from a plain injection path by noting that very small fragment sets can be injected directly without tiering, though the sibling it means (cf_inject) is never named.

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?

An explicit 【何时调】 block gives the trigger condition (candidates exceed budget; a keep/drop decision is needed) and the negative condition (fewer than 5 fragments → inject directly, skip tiering). The only gap is that the alternative is described by action rather than by tool name, leaving the agent to map '直接注入' onto cf_inject itself.

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