Skip to main content
Glama

session_health_check

Diagnose agent memory corruption by detecting missing embeddings, duplicate entries, orphaned handoffs, and stale rollups. Enable automatic repair to backfill embeddings and clean orphaned data.

Instructions

Run integrity checks on the agent's memory (like fsck for filesystems). Scans for missing embeddings, duplicate entries, orphaned handoffs, and stale rollups.

Checks performed:

  1. Missing embeddings — entries that can't be found via semantic search

  2. Duplicate entries — near-identical summaries wasting context tokens

  3. Orphaned handoffs — handoff state with no backing ledger entries

  4. Stale rollups — compaction artifacts with no archived originals

Use auto_fix=true to automatically repair missing embeddings and clean up orphans.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
auto_fixNoIf true, automatically repair issues (backfill embeddings, remove orphaned handoffs). Default: false.
Behavior4/5

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

With no annotations, the description carries full burden and successfully details the four specific integrity checks performed and the repair behavior of auto_fix. However, it lacks safety disclosure (e.g., whether auto_fix is destructive, if checks lock the memory, or performance characteristics) that annotations would typically provide.

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?

Perfectly structured: analogy upfront, enumerated list for scannable detail, parameter guidance at the end. No wasted words; every sentence conveys specific behavioral or functional information. Effective use of formatting (bold, list) for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive on input/functionality but has critical gaps given no output schema: it fails to describe what the tool returns (list of violations? summary statistics? success boolean?). For a diagnostic tool, return value description is essential. Also lacks safety warnings for the auto_fix mutation capability.

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?

Schema has 100% coverage (baseline 3). The description adds valuable semantic mapping by linking auto_fix to specific issues mentioned in the list ('repair missing embeddings and clean up orphans'), helping the agent understand which of the four checks get remediated versus just reported.

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?

Excellent specificity: 'Run integrity checks on the agent's memory' provides clear verb + resource. The fsck analogy immediately distinguishes this from siblings like maintenance_vacuum or session_compact_ledger by positioning it as a diagnostic/verification tool rather than optimization or storage management.

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?

Provides clear context through the fsck analogy (implying maintenance/diagnostic use) and explicit guidance on the auto_fix parameter ('Use auto_fix=true to...'). However, lacks explicit when-to-use guidance versus similar maintenance siblings (e.g., 'Run this before compaction' or 'Use instead of vacuum when checking for corruption').

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/dcostenco/BCBA'

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