Skip to main content
Glama

刷新本地 Codex 配额与上下文快照

app_refresh_quota

Rescans local ~/.codex/sessions token_count snapshots without network calls to refresh quota state and sync the active conversation context watermark.

Instructions

UI 专用:零网络开销重新扫描本机 ~/.codex/sessions 最新 token_count 快照,并同步当前话题上下文水位。

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": "app_refresh_quota"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. It usefully reveals the data source (~/.codex/sessions), that it makes zero network calls, and that it reads the latest token_count snapshot, but '同步...上下文水位' (syncs context watermark) leaves it ambiguous whether state is mutated, and there is no mention of behavior when no session files exist or what the caller receives.

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?

A single compact sentence with the scope qualifier and the zero-network guarantee front-loaded before the two actions. No redundant or filler wording.

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 simple one-optional-parameter tool with no output schema or annotations, the description covers the mechanism and data source, but omits the sessionId semantics, whether state is modified, and what a refresh produces. Adequate but with clear gaps.

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 coverage is 0% and the sole parameter sessionId is never mentioned. The description's emphasis on '最新' (latest) even suggests automatic selection, leaving the role of an optional sessionId entirely unexplained.

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: rescans local ~/.codex/sessions for the latest token_count snapshot and syncs the current topic context watermark, with a 'UI-only' scope marker. The action is concrete and distinguishable from session/persona management siblings, though no sibling is named as an alternative.

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

Usage Guidelines3/5

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

'UI 专用' (UI-only) implies a usage boundary, hinting agents generally should not need this, but it never states when it should be called, what precedes it, or what to use instead (e.g., app_get_state). Guidance is implied rather than explicit.

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