Skip to main content
Glama

ctxstore — memory that follows you across models

Load Context

load_context
Read-onlyIdempotent

Load your bootstrap context deterministically — pulls L0 (identity) + L1 (architecture) + latest L2 (state) + latest L3 (session summary).

Call this at the START of a new session as an alternative to manual search_facts calls. Returns your layered memory structured for immediate use.

Optional: pass profile='worker-dev' (or another platform:profile: slug) to execute that profile's boot recipe — the server reads platform:profile::current, follows the pointer, parses LOAD/REQUIRE/HANDLER lines, fetches every named fact, and returns the merged bundle in one round trip. vars= supplies values for $TASK_FACT_KEY and similar recipe variables.

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

Input Schema

NameRequiredDescriptionDefault
fullNoReturn the full (uncapped, 32KB) bundle via the complete compose path. The MCP initialize response already inlines an ~8KB wake bundle for returning agents, and a plain load_context() serves that same cached bundle cheaply; pass full=true when you explicitly need everything (e.g. the inlined bundle was truncated). Default false.
hintNoAmbient query for the baton section: what this session is about before the user has said anything (e.g. the git branch + last commit subject, the project directory, the calendar). Searched alongside your previous self's agent:<id>:wake-baton:current queries; the hits not already in the layered bundle are appended as a baton section. A hinted bundle is compiled fresh (not served from the cache).
varsNoVariable substitutions for the recipe (e.g. {'TASK_FACT_KEY': 'comms:dispatch:dev:42'}). Unknown variables remain literal in the resolved keys.
scopeNoOptional project/tenant-scope prefix (e.g. 'chad' or a project slug like 'emily-core'). Used for profile lookup AND, when agent_id is set, for project-scoped self-note lookups (project:<scope>:agent:<agent_id>:self-note:closing preferred over global agent:<agent_id>:self-note:closing).
profileNoOptional profile slug (e.g. 'worker-dev', 'orchestrator', 'analyst', 'cold'). Server reads <scope>:profile:<profile>:current in tenant first (if scope set), then platform:profile:<profile>:current in platform_facts.
sectionNoExpand one section of the wake index: every pointer (key — headline) in that key family, ranked permanent → active → newest. Section names are the headers in the inlined index (e.g. 'conventions', 'people', 'project:emily-core', 'agent:<your id>'). Bodies stay a get_fact away.
agent_idNoCalling agent's identity slug (e.g. 'emily_code_4.7'). When set, self-note injection uses exact-key lookups (agent:<agent_id>:self-note:closing/opening) instead of tenant-wide substring scans — required for correct behaviour on multi-agent tenants where another agent's note would otherwise leak in. When omitted, falls back to the legacy substring scan for backwards compatibility.
max_fact_charsNoPer-fact body cap. Facts exceeding this length are truncated in the bundle with an explicit get_fact() pointer for the full body. Default 1500. Tunable up if you legitimately need more, but consider splitting large facts instead.
max_total_charsNoTotal bundle cap. If the assembled bundle exceeds this, a BUNDLE WARNINGS section is appended with the size signal. The bundle is NOT truncated at this limit — the warning lets the caller decide whether to lower top_k_per_layer or use targeted get_fact queries. Default 32000.
top_k_per_layerNoMax facts to return per layer (default 10)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

The annotations already declare readOnlyHint/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely new behavior: an ~8KB wake bundle is inlined and cached, a hinted bundle is compiled fresh rather than served from cache, per-fact and total caps truncate with get_fact pointers, and over-cap bundles emit a BUNDLE WARNINGS section rather than being cut. That is strong disclosure, but the return shape itself is described only loosely ('structured for immediate use') and there is no output schema to fall back on.

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 the core action and the layer list before any optional detail, and each paragraph covers a distinct mode (default load, profile recipe, variable substitution). It is dense but every sentence carries information; the only cost is that the long em-dash-heavy sentences are slower to parse than a short bulleted breakdown.

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 zero required parameters, ten optional ones, and no output schema, the description does enough: it names the returned layers, explains section expansion and pointer-to-get_fact deferral, and documents the cap/truncation model. Minor gap: it never says what the response envelope looks like or how to tell a truncated bundle from a complete one beyond the warnings section.

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 description exceeds it by explaining semantics the schema does not: profile triggers a recipe lookup chain and LOAD/REQUIRE/HANDLER parsing in one round trip, vars substitutes $TASK_FACT_KEY-style keys while leaving unknown variables literal, and hint causes a fresh compile instead of a cache hit. Several parameters (section, agent_id, max_fact_chars, top_k_per_layer) are left entirely to the schema.

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?

States a specific verb (load) and resource (bootstrap context) and enumerates exactly what is pulled: L0 identity, L1 architecture, latest L2 state, latest L3 session summary. It also names the sibling it replaces ('as an alternative to manual search_facts calls'), so an agent can distinguish it without opening any 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?

Gives an explicit trigger ('Call this at the START of a new session') plus the alternative it displaces (manual search_facts calls). It further routes between variants: skip full unless the inlined bundle was truncated, and pass profile only when executing a boot recipe. Nothing about when to reach for it 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.