Skip to main content
Glama

slice_and_retrieve

Archive previous context without deleting it, update the working summary, and return only context relevant to the current message to cut token usage and enable immediate execution.

Instructions

Non-destructively archive previous_context, update working_summary, and retrieve only the context needed for current_message so the AI can execute immediately with minimal tokens.

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": {
      "previous_context": "<previous_context>",
      "current_message": "<current_message>"
    },
    "name": "slice_and_retrieve"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoOptional slice/session identifier (defaults to "default").
current_messageYesThe user's current message or active task to execute.
previous_contextYesRequired. Supply the previous conversation context (prior turns, decisions, and constraints) so ContextSlicer can archive it without deleting anything.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

C2.9/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 burden, and while it usefully discloses that archiving is non-destructive (nothing is deleted), it omits the rest of the mutation profile: whether working_summary is overwritten or merged, whether the archive persists across sessions, and what happens on repeated calls with the same id. It also gives no indication of the shape or size of the retrieved context beyond 'minimal tokens'.

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?

One densely packed sentence with the key actions front-loaded and the purpose clause trailing it; no filler. It is slightly overloaded, bundling three distinct operations into a single compound clause rather than enumerating them, but nothing is redundant.

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 three-parameter tool with no output schema and no annotations, the description covers the operations and the token-minimization intent reasonably well. It leaves the return value underspecified (what exactly is 'the context needed') and says nothing about persistence or state implications of updating working_summary, which an agent calling a mutating tool would want to know.

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 the schema already documents all three parameters including the 'default' id behavior. The description's 'archive previous_context ... without deleting anything' reinforces the previous_context parameter but adds no format, sizing, or interaction detail beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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 three concrete operations on named resources: archive previous_context, update working_summary, and retrieve the context needed for current_message. That is specific enough for an agent to know this is a context-compaction/retrieval tool rather than a slice CRUD operation like its siblings. It stops short of explicitly contrasting itself with get_slice or list_slices, which would be needed for 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 Guidelines2/5

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

There is a rationale ('so the AI can execute immediately with minimal tokens') but no actual when-to-use guidance, no preconditions, and no statement of when another tool such as get_slice or list_slices should be used instead. The agent must infer that this belongs at the start of a task turn.

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