Skip to main content
Glama

context

Load project memory to provide a session welcome or task-specific pack of decisions, constraints, lessons, and reminders for guiding work.

Instructions

Load project memory: the session welcome, or a context pack for a task.

welcome: overdue reminders, the active priority-5 norms, reminders due within 7 days, then the highest-scoring active memories (at most 3 from _shared); sent once per session (not repeated on --resume, whose context already has it; resent on SessionStart compact|clear, followed by up to 8 memories the agent wrote or read before it, kind "trail", and with a coloured systemMessage telling the person what was recovered). With session, later calls add: overdue reminders every 10 messages; with prompt, up to 5 memories whose title, tags or keywords hold a rare word of the message; and a nudge to save when the session has written no memory. task: decisions, constraints and lessons matching the task (Spanish and English stopwords ignored; with 3+ words a memory must hold 2 of them and score >= 25% of the best hit; constraints on files always enter), up to 3 memories one link (any kind) from them, and up to 5 related notes to open with read, within budget_tokens. Returns JSON {"text", "entries": [{"path", "score", "kind"}]}; score is 0-1, or null for norms, reminders, recalled and linked memories (welcome adds "already_sent"). The first welcome of a session may run the maintenance configured in episteme.toml (notice of pending review items, archiving of expired memories, vault backup), so this tool is not read-only.

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

Input Schema

NameRequiredDescriptionDefault
modeNo"welcome" (session start) or "task" (needs task).welcome
taskNotask: what you are about to do, in a few words.
promptNowelcome, from the UserPromptSubmit hook: the user's message (${prompt}); adds up to 5 memories that match its rare words.
sourceNoOnly for the SessionStart hook: ${source} (compact or clear).
projectNoProject; defaults to --project.
sessionNowelcome: session id; the welcome is sent once per session.
hook_eventNoOnly for Claude Code hooks: ${hook_event_name}. Omit otherwise.
budget_tokensNotask: size of the context pack (1 token ~ 4 chars).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.16.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations at all, the description carries the full burden and does so unusually well: it states the welcome is sent once per session, is not repeated on --resume, is resent on SessionStart compact|clear with a trail of up to 8 memories and a coloured systemMessage, and that later session calls add reminders every 10 messages. It also discloses side effects the agent could not otherwise know — maintenance may run on the first welcome (pending review notice, archiving of expired memories, vault backup) and explicitly warns "this tool is not read-only," which is exactly the kind of non-read-only disclosure the missing destructiveHint would have provided.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence front-loads the purpose effectively, but the body is a dense run-on of nested parentheticals mixing agent-facing guidance with hook-configuration minutiae (--resume, ${source}, SessionStart compact|clear). Much of it earns its place for behavioral transparency, yet the delivery makes it harder to scan than it needs to be.

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?

For an 8-parameter tool with zero annotations and no output schema, the description covers modes, hook-driven invocation, token budgeting, and even inlines the return shape {"text", "entries": [{path, score, kind}]} along with the meaning of a null score and the extra already_sent key. Nothing an agent needs in order to call this correctly appears to be missing.

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 baseline is 3, and the description goes beyond the schema by explaining emergent behavior of parameters: session causes reminders every 10 messages, prompt pulls up to 5 memories matching rare words, and source is only for compact|clear. It adds real meaning about parameter interactions rather than restating field docs, though budget_tokens and project are left to the schema.

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?

Opens with a specific verb and resource ("Load project memory") and cleanly splits the two modes, welcome and task, each of which an agent can recognize. It distinguishes the modes from each other but never explicitly contrasts itself with siblings like search, surface or read, leaving the agent to infer that this is the session-start/context-pack loader rather than a general retrieval tool.

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?

Gives clear conditions per mode: welcome for session start, task "for a task" with a few-word description, plus hook-specific conditions for prompt, source and hook_event. It stops short of explicit exclusions or naming an alternative for ad-hoc searching, so the agent knows when this applies but not when to prefer a sibling instead.

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