Skip to main content
Glama

Context Pressure Check

memory-context-pressure

Assess context window pressure during long AI sessions and get an ordered action plan to save memories, write a handoff, or compact before performance degrades.

Instructions

Self-assess context window pressure and get an action plan. Call periodically during long sessions — especially after big tool outputs, many file reads, or when responses feel sluggish. Levels: ok, warm, hot, critical. Also call with phaseBoundary=true at natural phase boundaries (task complete, pivoting focus, finishing a subsystem) — pivots thrash the cache anyway, so that is the RIGHT moment to compact. Returns an ordered actionPlan telling you exactly what to do (save memories, write handoff, compact).

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": {
      "level": "<level>"
    },
    "name": "memory-context-pressure"
  }
}

Input Schema

NameRequiredDescriptionDefault
levelYesYour honest assessment of current context pressure.
reasonNoWhat triggered this check (e.g. "long file reads", "extended session", "near token limit", "phase complete").
phaseBoundaryNoTrue when a task/phase just finished or you are about to pivot focus. Forces the action plan toward a proactive compact, even at ok/warm levels.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does well: it discloses the four-level scale, that the result is an ordered actionPlan, and that phaseBoundary 'forces the action plan toward a proactive compact, even at ok/warm levels.' It adds a useful rationale (pivots thrash the cache). It stops short of stating whether the call itself is side-effect-free or what the numeric thresholds behind each level are.

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?

Four sentences, all front-loaded on the core action, with the trigger conditions before the level enumeration. The phrasing 'responses feel sluggish' and 'pivots thrash the cache anyway' is casual but functional. Minor repetition between listing the levels and the phaseBoundary clause costs little.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter, read-oriented tool with no output schema, the description covers what it returns (an ordered actionPlan naming specific follow-ups like saving memories, writing handoffs, compacting) and both calling modes. Only the safety profile of the call itself and any level thresholds are unstated, which is a small gap given no annotations exist.

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 coverage is 100%, so the baseline is 3 and the schema already documents level, reason, and phaseBoundary. The description still adds value by explaining why phaseBoundary matters ('pivots thrash the cache anyway, so that is the RIGHT moment to compact') and by listing the level names in order of severity, which reinforces the enum's intent.

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: 'Self-assess context window pressure and get an action plan', and it names the concrete payload ('ordered actionPlan'). It does not explicitly contrast itself with the nearest sibling (memory-budget), so an agent must infer the boundary, which keeps this just 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 Guidelines5/5

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

It gives explicit triggers: 'Call periodically during long sessions — especially after big tool outputs, many file reads, or when responses feel sluggish.' It then covers a second, distinct calling mode ('Also call with phaseBoundary=true at natural phase boundaries') with concrete examples of boundaries. Nothing about when to call is left to inference.

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