Skip to main content
Glama

context_add

Idempotent

Save a project rule, decision, constraint, or note so later sessions and other agents can see it. Use when the user asks you to remember something for this project.

Instructions

Save a rule, decision, constraint or note for the current project, so later sessions and other agents see it. Use it when the user asks you to remember something for this project. Instructions (kind=instruction) are delivered with every task_start by default; other kinds are delivered when they match the task. To change or retire an existing record, find it with context_list and use context_update instead of adding a duplicate. Longer reusable documentation belongs in knowledge: knowledge_search and knowledge_read find and read it, and knowledge_create writes it when Istok runs with --tools full; otherwise ask the user to add it with istok knowledge add.

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": {
      "title": "<title>"
    },
    "name": "context_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoOptional context body.
kindNoContext kind: note, decision, instruction, or constraint.
tagsNoOptional context tags.
scopeNoInstruction scope.
titleYesContext title; must not be blank.
sourceNoContext source: user, agent, or import.
deliveryNoDelivery mode: always, ranked, or manual.
priorityNoInstruction priority.
expires_atNoOptional RFC3339 expiry timestamp.
visibilityNoFuture sync visibility: shared or local_only.
sensitivityNoContext sensitivity: normal or private.
review_afterNoOptional RFC3339 review timestamp.
superseded_byNoOptional UUIDv7 of the active replacement record.

Output Schema

NameRequiredDescriptionDefault
errorNo
contextNo
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations, it discloses the delivery model: kind=instruction records ship with every task_start by default, while other kinds only surface when they match the task. That is meaningful behavioral context an agent could not infer from readOnlyHint/idempotentHint/destructiveHint. It does not cover lifecycle details like expiry, review_after, or superseded_by semantics, which keeps it from a 5.

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?

Front-loaded with purpose and trigger before the routing details, and every sentence carries distinct information. The final knowledge/CLI fallback sentence is dense but earns its place as a redirect.

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?

With 13 params, an output schema, and full annotation coverage, the description supplies what structured fields cannot: when to add vs. update, and how kinds affect delivery. Remaining gaps around expiry/supersession are adequately handled by the schema and output schema.

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, but the description genuinely adds meaning by explaining the consequence of the kind parameter's instruction value on delivery. Other fields (scope, priority, visibility, sensitivity, expires_at) are left entirely to their schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb (save) and resource (rule, decision, constraint, note) plus the scope (current project) and the payoff (later sessions and other agents see it). It also explicitly distinguishes itself from context_update and the knowledge_* tools, so an agent can route without opening a schema.

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 an explicit trigger ('when the user asks you to remember something for this project'), an explicit anti-pattern (don't add a duplicate; find it with context_list and use context_update), and an explicit alternative for longer documentation (knowledge_search/knowledge_read/knowledge_create, with the --tools full caveat and a manual fallback).

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