Skip to main content
Glama
@event4u/agent-config

@event4u/agent-config

Official

chat_history_read

Read-onlyIdempotent

Read recent chat-history JSONL entries to recover decisions, notes, and phase markers from earlier sessions, returning the resolved path and matching entries with newest last.

Instructions

Read recent entries from the chat-history JSONL (agents/runtime/.agent-chat-history; legacy agents/.agent-chat-history accepted) to recover decisions, notes and phase markers from an earlier session. Returns the resolved path and matching entries, newest last.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "chat_history_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
lastNoReturn only the most recent N entries, after other filters apply.
pathNoHistory-file override; default is the standard location.
aroundNoTimeline anchor: return the entries around this ref (from a detail:"index" row) instead of the filtered list — depth_before/depth_after neighbours plus the anchor. Refs are within-file ordinals; rotation invalidates them.
detailNo'index' returns compact rows (ref, t tag, preview, tokens_estimate) — scan, then re-read refs via `around` or a filter. 'full' (default) returns whole entries.full
sessionNoFilter to a single 16-char session id.
entry_typeNoFilter by the `t` tag (e.g. note, decision, phase).
depth_afterNoNeighbours after the anchor (with `around`). Defaults to 3.
depth_beforeNoNeighbours before the anchor (with `around`). Defaults to 3.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv20.4.0
    • changedInput schema / properties / detail / description
      Previous value: -"'index' returns compact rows (ref, t tag, ~100-char preview, tokens_estimate) instead of full entries — scan first, then re-read the refs you need via `around` or a narrowed filter. History entries are large, so index mode pays off here. 'full' (default) returns complete entries."New value: +"'index' returns compact rows (ref, t tag, preview, tokens_estimate) — scan, then re-read refs via `around` or a filter. 'full' (default) returns whole entries."
    • changedInput schema / properties / path / description
      Previous value: -"Optional history-file path override; defaults to the standard chat-history location under the project root."New value: +"History-file override; default is the standard location."
  2. Changed4 schema fields changedv8.8.0
    • addedInput schema / properties / around
      Added value: +{
      +  "description": "Timeline anchor: return the entries around this ref (from a detail:\"index\" row) instead of the filtered list — depth_before/depth_after neighbours plus the anchor. Refs are within-file ordinals; rotation invalidates them.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / depth_after
      Added value: +{
      +  "default": 3,
      +  "description": "Neighbours after the anchor (with `around`). Defaults to 3.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / depth_before
      Added value: +{
      +  "default": 3,
      +  "description": "Neighbours before the anchor (with `around`). Defaults to 3.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "full",
      +  "description": "'index' returns compact rows (ref, t tag, ~100-char preview, tokens_estimate) instead of full entries — scan first, then re-read the refs you need via `around` or a narrowed filter. History entries are large, so index mode pays off here. 'full' (default) returns complete entries.",
      +  "enum": [
      +    "index",
      +    "full"
      +  ],
      +  "type": "string"
      +}
  3. Changed4 schema fields changedv1.0.2
    • addedInput schema / properties / entry_type / description
      Added value: +"Filter by the `t` tag (e.g. note, decision, phase)."
    • addedInput schema / properties / last / description
      Added value: +"Return only the most recent N entries, after other filters apply."
    • addedInput schema / properties / path / description
      Added value: +"Optional history-file path override; defaults to the standard chat-history location under the project root."
    • addedInput schema / properties / session / description
      Added value: +"Filter to a single 16-char session id."
  4. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered. The description adds real value beyond them: the default and legacy file locations, the fact that an override is resolved, the return payload ('resolved path and matching entries'), and the ordering ('newest last').

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?

Two tight sentences: the first front-loads what is read and where, the second states the return shape. No filler, and the ordering detail is placed where it is most useful.

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 an 8-parameter, zero-required read tool with no output schema, the description compensates by describing the return value and its ordering, which is the main gap an output schema would otherwise fill. It does not explain the interaction between 'around' and the filters, but the schema already covers that.

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 every parameter (last, around, detail, session, entry_type, depth_before/after, path) is already documented in the schema. The description only echoes the default path behaviour, adding no extra semantics; the 3 baseline applies.

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?

Names a specific verb and resource ('Read recent entries from the chat-history JSONL') plus the concrete file paths and the intent ('recover decisions, notes and phase markers from an earlier session'). The read-only framing implicitly separates it from the sibling chat_history_append, though no alternative is named explicitly.

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 phrase 'to recover decisions, notes and phase markers from an earlier session' gives a usable when-to-use context, but there is no statement of when not to use it and no routing to alternatives such as memory_lookup or memory_get for related retrieval needs.

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