Skip to main content
Glama
abdwhb-png

pi-session-recall

by abdwhb-png

Build focused Pi session context

pi_session_context
Read-onlyIdempotent

Extracts deterministic lexical context from a session transcript to answer a specific question, using conversation history by default without calling another LLM.

Instructions

Return deterministic lexical context for a question. Defaults to useful conversation content and does not call another LLM.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoUse conversation for visible user/assistant history (default); use raw only when internal records are explicitly required.conversation
questionYesQuestion used to select focused historical context, from 1 to 4000 characters.
max_charsNoMaximum Unicode characters to return, from 1 to 100000.
session_refYesOpaque session_ref returned by pi_session_search or pi_session_find; reuse it unchanged.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
textYes
questionYes
retrievalYes
session_refYes
view_entriesYes
total_entriesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered. The description adds genuinely non-obvious traits beyond those: the output is deterministic and no additional LLM call is made, which tells the agent this is a cheap, reproducible read.

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?

Two tight sentences, front-loaded with the purpose and the deterministic/no-LLM caveat. No wasted wording, though slightly terse on scope/limits.

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 needn't be explained, and annotations cover the safety profile. The description covers purpose and default mode adequately; only explicit sibling differentiation is missing.

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 including mode, question, max_chars, and session_ref is already documented in the schema. The description adds no syntax or format detail beyond that, so the baseline 3 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?

States a specific verb+resource ('Return deterministic lexical context') and the selection input ('for a question'), which is clearer than a bare name restatement. It doesn't explicitly distinguish itself from siblings pi_session_search/pi_session_find/pi_session_read, so an agent must infer the boundary from the names alone.

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 notes the default behavior ('Defaults to useful conversation content'), and the mode param description covers conversation vs raw. But there is no explicit when-to-use-this vs the sibling session tools, leaving the routing decision to inference.

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