Skip to main content
Glama

ctxstore — memory that follows you across models

Get Fact by Key

get_fact
Read-onlyIdempotent

Retrieve a fact by its exact key — deterministic, never misses. Use get_fact for self-notes: get_fact(key='agent::self-note:opening') or get_fact(key='agent::self-note:closing'). search_facts misses self-notes because their embedding similarity scores below other identity facts — get_fact(key=) is the only reliable retrieval path. Also use for inter-agent handoffs when the exact key is known. Returns the current (non-deprecated) version of the fact.

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": {
      "key": "<key>"
    },
    "name": "get_fact"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesExact fact key (e.g. 'sprint:bootstrap-namespace:review-emily_dev')
include_grantedNoWhen true (default) and this account has no fact under the key, a key that starts with a prefix shared with this account resolves from that workspace, tagged |from:<grantor>'s workspace: <prefix>. Set false to read this account only. Ignored inside a workspace session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / include_granted
      Added value: +{
      +  "default": true,
      +  "description": "When true (default) and this account has no fact under the key, a key that starts with a prefix shared with this account resolves from that workspace, tagged |from:<grantor>'s workspace: <prefix>. Set false to read this account only. Ignored inside a workspace session.",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds real behavioral context beyond that: deterministic exact-key lookup, that search_facts will miss these keys, and that the current non-deprecated version is returned rather than history. It does not discuss the include_granted cross-workspace fallback, which stays in the schema.

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 verb+resource, then rationale, then use cases. Slightly redundant in restating the never-misses/reliable-path point twice, but every sentence carries information an agent needs to choose this over search_facts.

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?

For a two-parameter read with no output schema, the description covers return semantics ('current (non-deprecated) version'), key format, and retrieval reliability. The only gap is not explaining the cross-workspace grant fallback behavior, though the schema documents it fully.

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 both parameters are fully documented structurally. The description adds value by showing the canonical self-note key format ('agent:<name>:self-note:opening'), which is meaning beyond the schema's generic example. Baseline 3 for a schema-complete tool with only light additive key-format guidance.

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 and resource ('Retrieve a fact by its exact key') and immediately distinguishes itself from the sibling search_facts by retrieval mode (exact key vs similarity search). An agent can tell exactly what this tool does and what it is not.

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?

Explicitly names use cases (self-notes, inter-agent handoffs) and the alternative (search_facts) plus the concrete reason it fails there — self-note embeddings score below identity facts. This is a when-to-use plus when-not-to-use statement with a named alternative.

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.