Skip to main content
Glama

get_chat_history

Read-only

Retrieve complete chat session history with timestamps and participant roles from local storage for review or analysis.

Instructions

Return the full message history for a local chat session.

Args:
    session: Session name to load from `chats/{session}.json` (default `default`).

Returns:
    Formatted transcript with timestamps and roles, or a not-found message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNodefault
Behavior4/5

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

Annotations provide readOnlyHint=true, indicating it's a safe read operation. The description adds valuable context beyond this: it specifies the file path format ('chats/{session}.json'), mentions a default value for the session parameter, and describes the return behavior (formatted transcript or not-found message). This enhances understanding without contradicting annotations.

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 front-loaded with the core purpose in the first sentence, followed by structured 'Args' and 'Returns' sections that efficiently provide necessary details without redundancy. Every sentence earns its place, and the overall length is appropriate for the tool's complexity.

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 tool has annotations (readOnlyHint) but no output schema, the description does well by explaining the return values (formatted transcript or not-found message). It covers the single parameter thoroughly. However, it could slightly improve by mentioning error cases or performance aspects, but it's largely complete for a simple read tool.

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?

With 0% schema description coverage and 1 parameter, the description fully compensates by explaining the 'session' parameter: it defines it as 'Session name to load from `chats/{session}.json`' and notes the default value 'default'. This adds essential meaning not present in the schema, making the parameter clear and actionable.

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 specific action ('Return the full message history') and resource ('for a local chat session'), distinguishing it from siblings like 'list_chat_sessions' (which lists sessions) and 'clear_chat_history' (which deletes history). It precisely defines what the tool does without being vague or tautological.

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 by specifying it loads from 'chats/{session}.json', suggesting it's for retrieving stored chat data. However, it doesn't explicitly state when to use this tool versus alternatives like 'retrieve_stateful_response' or 'stateful_chat', nor does it provide exclusions or prerequisites for use.

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/merterbak/Grok-MCP'

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