Skip to main content
Glama

kernel_chat_context

Preview the cognitive context retrieved for a query to inspect and debug the memory retrieval pipeline.

Instructions

Preview the cognitive context that would be retrieved for a query. Useful for debugging the retrieval pipeline.

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": {
      "query": "<query>"
    },
    "name": "kernel_chat_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe query to retrieve context for
budgetNoMax context tokens (default from config)
episode_idNoEpisode ID for current-episode boost (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. 'Preview ... would be retrieved' implies a non-mutating inspection that does not consume or inject the context, which is genuinely useful signal. But it never states whether any state changes, whether an LLM call is made, or what the preview output looks like.

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?

Two short sentences with zero filler, and the core purpose is front-loaded before the debugging note. Nothing could be cut without losing 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?

There is no output schema, so the description is the only place a caller could learn what a 'context preview' returns (token counts, message snippets, ranking info), and it says nothing about that. For a three-parameter introspection tool with no annotations, the definition is serviceable but leaves the return shape and side-effect profile unstated.

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%, so 'query', 'budget', and 'episode_id' are already documented in the schema. The description adds no additional semantics for any parameter — for example, it does not explain what effect budget has on the preview or when an episode_id should be supplied.

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 gives a specific verb and resource: 'Preview the cognitive context that would be retrieved for a query.' The word 'Preview' plus 'would be retrieved' signals a dry-run/inspection tool distinct from retrieval tools like kernel_chat_recall. It does not explicitly name a sibling to contrast with, which 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 Guidelines3/5

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

'Useful for debugging the retrieval pipeline' supplies one implied use case, which is more than nothing. However, there is no explicit when-to-use versus when-not guidance, no statement of what to call instead when you want the context actually applied, and no mention of prerequisites such as prior chat/episode setup.

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