Skip to main content
Glama

get_context

Retrieve relevant prior observations within a token budget using semantic search or keyword fallback, filtered by time and optional agent.

Instructions

Recall relevant prior context within a token budget.

Progressive disclosure: returns more detail when budget allows.
  ≤ 500 tokens  → index only   (type + first 12 words per entry)
  ≤ 2000 tokens → preview      (type + first 40 words)
  >  2000 tokens → full         (complete content)

Combines semantic vector search (if fastembed available) with keyword
fallback, filtered to the last `days` days.

Args:
    query:        What you are looking for — natural language.
    budget_tokens: How many tokens you can spend on context (default 2000).
    agent_slug:   Restrict to a specific agent's observations (optional).
    days:         How far back to search (default 90 days).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
budget_tokensNo
agent_slugNo
daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations exist, so the description carries full burden. It discloses progressive disclosure behavior, the combination of vector search and keyword fallback, and filtering by days. It also mentions dependency on fastembed availability. This gives good insight into how the tool operates, though edge cases or failure modes are not mentioned.

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 highly concise and well-structured. It starts with a one-line summary, followed by a bulleted explanation of progressive disclosure tiers, then an Args list. Every sentence adds value, and the structure front-loads the key concept. No unnecessary text.

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?

Given the tool's moderate complexity (4 parameters, output schema present), the description covers all parameters, the progressive disclosure behavior, and the search algorithm. The presence of an output schema means return values need not be detailed here. It lacks handling of empty results or errors, but overall provides sufficient context for an agent to select and invoke the tool.

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 description coverage is 0%, but the description includes an 'Args' section explaining each parameter in plain language (e.g., query is natural language, budget_tokens controls progressive disclosure levels, agent_slug for restriction, days for recency). This adds significant meaning beyond the schema's type/default information, effectively compensating for the schema's lack of descriptions.

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

Purpose4/5

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

The description clearly states the tool's function: 'Recall relevant prior context within a token budget.' It explains the progressive disclosure based on budget and the search approach. While specific, it does not explicitly differentiate from sibling tools like search_memory or surface_relevant_context, which perform similar retrieval tasks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when prior context is needed within a token budget, and explains the progressive disclosure tiers. However, it does not specify when not to use this tool, nor does it mention alternative tools for different scenarios (e.g., exact search, full-text search). The 'Args' section provides parameter descriptions but no explicit 'when to use' guidance.

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/SVerITG/Metis_PH'

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