Skip to main content
Glama

get_context

Generate a token-budgeted memory context block from past events, optionally biased toward a specific focus area, to avoid reading the full summary.

Instructions

Generate a token-budgeted memory context block.

Use when you don't want to read the full summary. ``focus`` (e.g.
'src/auth/') biases the context toward a specific area.

Read-only; assembles a freshly-budgeted context block from
events.jsonl.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
focusNoOptional path prefix or keyword to bias selection toward (e.g., 'src/auth/'). When omitted, the context is project-wide.
tokensNoApproximate target token budget for the returned markdown (default 2000). Output may be slightly over or under as events are included as whole units. Recommended range: 500-8000.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description bears full responsibility. It declares the tool is read-only and assembles data from events.jsonl, and mentions token budgeting. However, it does not elaborate on edge cases (e.g., token limit behavior) or potential side effects, leaving some transparency gaps.

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 extremely concise, consisting of three sentences that efficiently convey purpose, usage, and behavior. It is front-loaded with the core function and contains no redundant information.

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 presence of an output schema and the tool's simplicity (two optional parameters), the description adequately covers the main aspects: what it does, when to use it, and a key behavioral trait (read-only). Minor omission: it does not explicitly mention the output format, but that is covered in the schema.

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?

The input schema already provides descriptions for both parameters (focus and tokens) with 100% coverage. The description adds a usage example for focus but does not significantly enhance understanding beyond the schema. Baseline score of 3 is appropriate.

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 generates a token-budgeted memory context block, contrasting with reading the full summary. It mentions the focus parameter for biasing and identifies the data source (events.jsonl), distinguishing it from sibling tools like get_summary.

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 explicitly advises using this tool when you don't want to read the full summary, providing a clear usage scenario. However, it does not discuss when not to use it or mention alternative tools among siblings, which would strengthen the 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/riponcm/projectmem'

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