Skip to main content
Glama

get_context

Retrieve relevant prior context from your indexed library, adjusting detail based on your token budget. Supports semantic vector search and keyword matching, filtered by time frame and 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
Behavior5/5

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

No annotations provided, so description carries full burden. It comprehensively discloses progressive disclosure thresholds, search method (vector+keyword with fallback), time filtering, and agent restriction. No contradictions or omissions.

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 front-loaded with purpose and structured with clear sections for progressive disclosure and parameter details. It is somewhat lengthy but every sentence adds value; could be slightly more concise without losing information.

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 existence of an output schema (to document return values), the description covers all necessary aspects: query behavior, token budget mechanics, filtering, and fallback. It is complete for a tool with 4 parameters and complex behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description includes a docstring explaining each parameter (query, budget_tokens, agent_slug, days) with defaults and semantics, adding meaning beyond the raw schema properties.

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 'Recall relevant prior context within a token budget,' specifying a distinct verb and resource. The progressive disclosure mechanism differentiates it from sibling tools like search_memory or surface_relevant_context, which may not have token budget awareness.

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 explains usage (when token-budgeted context is needed) and the progressive disclosure, but does not explicitly state when not to use it or mention alternatives among siblings. It is clear but lacks exclusion criteria.

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'

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