Skip to main content
Glama

retrieve_recent_context

Read-onlyIdempotent

Retrieve recent dialog turns from a session in chronological order to provide contextual history for LLM conversations.

Instructions

Retrieve the most recent dialog turns for a session.

Returns turns in chronological order (oldest first) so they can be directly used as LLM context.

Args: session_id: Conversation session to query. limit: Maximum number of recent turns to return (default 10).

Returns: JSON string with session id, turn count, and turn list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare safe behavior (readOnly, idempotent, non-destructive). The description adds value by explaining the chronological ordering and that the output is suitable as LLM context, but it does not disclose potential edge cases such as empty sessions or error conditions.

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 very concise: two sentences followed by structured Args/Returns sections. It is front-loaded with the purpose and contains no extraneous 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 simplicity of the tool (2 params, no nested objects), the presence of an output schema, and comprehensive annotations, the description covers all necessary aspects: what it does, what it returns, and how to use it. No additional detail is required.

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?

With 0% schema description coverage, the description fully compensates by clearly explaining both parameters: session_id as 'Conversation session to query' and limit as 'Maximum number of recent turns to return (default 10)', providing meaning beyond the schema.

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 specifies the action 'retrieve' and the resource 'most recent dialog turns for a session', clearly distinguishing it from sibling tools that write (store_dialog_turn) or search memory (search_memory).

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 for obtaining LLM context but does not explicitly guide when to prefer this over alternatives like search_memory, which could also retrieve context. No when-not-to-use guidance is given.

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/kbarbel640-del/trinitas-mcp'

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