Skip to main content
Glama
abdwhb-png

pi-session-recall

by abdwhb-png

Search Pi sessions

pi_session_search
Read-onlyIdempotent

Search past Pi coding-agent session transcripts by literal text or exact phrase to recall prior conversations. Scope results to a project or all projects.

Instructions

Literal case-insensitive search across primary Pi session histories; complete session UUIDs are also recognized, though pi_session_find is the more direct lookup. Defaults to the configured scope and visible conversation content; use scope all only for explicit cross-project recall.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoUse conversation for visible user/assistant history (default); use raw only when internal records are explicitly required.conversation
limitNoMaximum number of matching sessions to return, from 1 to 25.
queryYesOne literal token or exact phrase, from 1 to 4000 characters.
scopeNoSearch primary sessions from the configured active project by default; use all only for an explicit cross-project search. Nested subagent/artifact sessions are excluded.project
cursorNoOmit for the first page. Legacy first-page values '/' and 'start' are accepted. For later pages, pass only the next_cursor returned by the preceding call unchanged.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
scopeYes
matchesYes
has_moreYes
next_actionNo
next_cursorNo
scanned_sessionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world behavior, so safety is covered. The description still adds real behavioral context: search is literal and case-insensitive, default scope is the active project with visible content only, and nested subagent/artifact sessions are excluded from results. It stops short of describing result ordering or match highlighting.

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 dense sentences with no filler: the search semantics and the sibling alternative come first, then the scoping default and its exception. Front-loaded and every clause carries information.

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?

With an output schema present, return values need no explanation, and pagination via cursor is fully covered in the schema. The description covers scope defaults, content visibility, and the UUID edge case; only the relationship to the other read/context siblings is left implicit.

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 (mode, limit, query, scope, cursor) is already documented in the schema, including the enum guidance for mode and scope. The description echoes the scope-default guidance but adds no syntax or format detail beyond it, which is the baseline-3 case.

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?

States a specific verb and resource (literal case-insensitive search across primary Pi session histories) plus a notable edge case (complete session UUIDs are recognized) and explicitly routes UUID lookups to pi_session_find. An agent can distinguish this from its siblings without opening a schema.

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 context: defaults to the configured scope and visible conversation content, and warns to use scope all only for explicit cross-project recall. It names pi_session_find as the more direct alternative for UUID lookup. It does not, however, state when pi_session_context or pi_session_read should be used instead, so the routing guidance is partial.

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