Skip to main content
Glama

get_last_context

Retrieve the last context snapshot to resume work where a previous agent left off, avoiding redundant exploration and token waste.

Instructions

Return the most recent context snapshot written by context_pack.

Call this at the START of a session to resume where the previous agent left off. Returns: query, sections, token_count, generated_at, agent, org_graph_summary. Returns {"status": "no_context"} if no snapshot exists.

Claude: call this automatically at session start when starting work on a known project. It shows what the last agent was looking at, preventing duplicate exploration and token waste.

Do NOT call on a fresh project that has never run context_pack.

repo_path: optional absolute path to the target repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathNo
Behavior4/5

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

Describes return values and the no-context case. Lacks explicit mention of read-only nature but implies it through 'Return' and no side effects. No annotations present.

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-structured with clear sections, but slightly verbose with instructions to Claude. Each sentence adds value.

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?

Comprehensive for a single-parameter tool: covers return values, error state, usage timing, and parameter. No output schema needed.

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?

Parameter 'repo_path' is described as optional absolute path, adding meaning beyond schema type info. With 0% schema coverage, this explanation is valuable.

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 uses specific verb 'Return' and resource 'most recent context snapshot', clearly distinguishing it from the sibling tool 'context_pack' which writes the snapshot.

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

Usage Guidelines5/5

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

Explicitly states when to call (at session start for known projects) and when not to (fresh projects without context_pack). Also mentions the alternative context_pack.

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/ashlesh-t/cognirepo'

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