Skip to main content
Glama

context

Retrieve relevant knowledge for the current reasoning step, ranked by recency, frequency, and priority. Choose output format: predicate, natural, or structured. Supports goal-driven selection and incremental diffs across sessions.

Instructions

Get the most relevant knowledge for the current reasoning step, ranked by composite salience (recency × frequency × priority). Returns a token-optimized context window in 'predicate', 'natural', or 'structured' format. Pass goals for goal-driven selection, sessionId for incremental diffs across turns. Side effects: read-only for stored facts (salience access counters may update internally). Auth: requires X-Tenant-ID header; FACT_READ permission when auth is enabled. Rate-limited per principal. Errors: VALIDATION_ERROR on bad args.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxFactsNoMaximum facts to return (default: 100)
minSalienceNoMinimum salience score 0.0–1.0 (default: 0.0)
predicatesNoOnly include these relationship types
scopeNoOptional scope filter
formatNoOutput format: 'predicate' (default, machine-readable), 'natural' (LLM-optimized natural language), or 'structured' (grouped with metadata)
includeRulesNoInclude reasoning rules in the context (default: true)
goalsNoGoal atoms for goal-driven context selection, e.g. [{"predicate":"recommend","args":["?x"]}]
sessionIdNoSession ID for incremental diffing — only returns facts changed since last call with this sessionId
autoResolveContradictionsNoAuto-resolve contradictions by salience (default: true)
maxFactsPerPredicateNoDiversity cap — maximum facts per predicate type
Behavior5/5

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

With no annotations provided, the description carries full burden. It discloses side effects (read-only for stored facts, internal salience access counter updates), auth requirements (X-Tenant-ID header, FACT_READ permission), rate-limiting per principal, and error types (VALIDATION_ERROR), offering comprehensive behavioral transparency.

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?

The description is a single dense paragraph but is well-organized, front-loading the core purpose and then providing key usage guidance. While slightly lengthy, every sentence adds necessary detail with no fluff.

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?

Given the tool complexity (10 parameters, no output schema), the description adequately covers purpose, parameter semantics, behavioral notes, and return formats. It provides enough detail for correct invocation and result interpretation.

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. The description adds value by explaining the composite salience formula (recency × frequency × priority), providing examples for goals parameter, and detailing the format options (predicate, natural, structured) and sessionId behavior (incremental diffing).

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 description clearly states the tool retrieves the most relevant knowledge ranked by composite salience for the current reasoning step. It distinguishes itself from sibling tools like 'recall' or 'ask' by focusing on a ranked, token-optimized context window.

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?

The description provides explicit guidance on optional parameters like goals for goal-driven selection and sessionId for incremental diffs. It does not explicitly state when not to use the tool or name alternatives, but the context is clear enough for correct usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Auctalis/nocturnusai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server