Skip to main content
Glama

context

Retrieve relevant knowledge for reasoning steps using salience ranking, optimizing context windows with goal-driven selection and incremental updates.

Instructions

Get the most relevant knowledge for your current reasoning step, ranked by composite salience (recency × frequency × priority). Returns a token-optimized context window. Supports three output formats: 'predicate' (machine-readable), 'natural' (LLM-optimized prose), 'structured' (grouped with metadata). Pass goals for goal-driven selection, sessionId for incremental diffing across turns.

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
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: ranking method (recency × frequency × priority), token optimization, output formats, and incremental diffing capability. However, it lacks details on performance characteristics, error conditions, or side effects, leaving some behavioral aspects unclear.

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

Conciseness5/5

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

The description is efficiently structured in two sentences: the first states the core purpose and key features, the second provides specific usage guidance for two parameters. Every sentence adds value without redundancy, making it appropriately concise and front-loaded with essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 10 parameters and no output schema, the description provides good coverage of purpose and key behaviors but lacks details on return values, error handling, or performance limits. Given the absence of annotations and output schema, more comprehensive context would be beneficial for full understanding.

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 the schema already documents all 10 parameters thoroughly. The description adds some semantic context by explaining the purpose of 'goals' and 'sessionId' parameters, but most parameter meanings are already covered in the schema. This meets the baseline for high schema coverage.

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's purpose with specific verbs ('Get the most relevant knowledge', 'ranked by composite salience') and resources ('knowledge', 'context window'). It distinguishes itself from siblings like 'recall', 'ask', or 'tell' by emphasizing relevance ranking, token optimization, and multiple output formats, making its unique function apparent.

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 clear context for when to use this tool ('for your current reasoning step') and mentions specific use cases like goal-driven selection and incremental diffing. However, it does not explicitly state when not to use it or name alternatives among sibling tools, which prevents a perfect score.

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