Skip to main content
Glama

get_context

Retrieve persistent project memory from previous coding sessions; call first in new sessions to get a context pyramid or run hierarchical searches across project, branch, session, and raw chunk data.

Instructions

Retrieve persistent memory from previous sessions. Call at session start with no arguments to get the context pyramid: project overview, current branch summary, and recent session summaries — all in ~500-800 tokens. Use with a query to do hierarchical search: matches project → branch → session summaries first, then drills into raw chunks only when needed. Use depth to control how deep to search. Always call this first in a new session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoSearch depth: 0=project summary only, 1=+branch summaries, 2=+session summaries (default), 3=+raw chunks. Start shallow, go deeper if needed.
queryNoSearch query. Searches hierarchically: project → branches → sessions → raw chunks. Omit for a full project overview pyramid.
typesNoFilter results by context type (only applies to raw chunk search at depth 3)
max_tokensNoMax tokens to return (default 3000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does meaningful work: it discloses the token budget of the default call (~500-800 tokens), the lazy hierarchical retrieval model (matches project → branch → session first, drills into raw chunks only when needed), and the depth control. It does not state permission/auth requirements or explicitly confirm the operation is read-only, though 'Retrieve' strongly implies it.

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?

Well front-loaded: the core action and the recommended no-argument session-start call come first, followed by query mode and depth. It is efficient, but the session-start instruction is stated twice ('Call at session start with no arguments' and 'Always call this first in a new session'), which is mild redundancy.

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?

For a 4-parameter tool with no annotations and no output schema, the description is nearly sufficient: it explains the default invocation, the search mode, depth progression, and roughly what gets returned and how large it is. The remaining gaps are the response shape of query results and any auth/prerequisite context, neither of which is covered anywhere else.

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 depth levels, the query hierarchy, the type filter, and the max_tokens default — baseline 3 applies. The description echoes the depth and query behavior but adds no syntax, format, or interaction detail beyond what the schema fields state.

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?

States a specific verb and resource ('Retrieve persistent memory from previous sessions') and describes the concrete artifact returned: the context pyramid of project overview, branch summary, and recent session summaries. It implicitly separates itself from the write-oriented sibling save_context by framing itself as the read/start-of-session tool, but it never names get_status or summarize_session, so sibling differentiation is only partial.

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?

Gives clear conditions for the two main modes — 'Call at session start with no arguments' for the pyramid, and 'Use with a query' for hierarchical search — plus 'Use depth to control how deep to search.' It even gives ordering guidance ('Always call this first in a new session'). It stops short of naming when NOT to use it or pointing at the alternatives (get_status, summarize_session), which is what a 5 would require.

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

Deploy Server

Other Tools