Skip to main content
Glama

Run Diagnostics

run_diagnostics

Detect and fix graph inconsistencies, verify storage and audit integrity, and reclaim SQLite space to keep AI workflow state memory reliable.

Instructions

Run graph sanity checks, health diagnostics, reference validation, audit chain verification, and storage maintenance. Supported actions: validate (check cycles, orphans, dangling edges), doctor (database WAL mode, schema version, storage health), check_refs (validate file paths and AST symbols with auto-heal), audit_chain (verify SHA-256 event hash integrity), compact (reclaim SQLite storage), archive (archive old completed tasks), prune_events (permanently prune events - admin mode required), version (retrieve package version info), dedupe (detect and merge duplicate nodes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applyNoFor dedupe action: whether to apply merging (default: false for dry-run).
actionNoThe diagnostic or maintenance action to execute.
checksNoOptional subset of validation checks.
dry_runNoSimulate event pruning without deleting.
projectNoTarget project name or slug.
auto_healNoAutomatically fix broken file references on check_refs.
older_thanNoAge duration threshold for prune_events (e.g. 90d).
preserve_typesNoEvent types to preserve from pruning.
older_than_daysNoAge threshold in days for archive (default: 30).
prune_orphaned_edgesNoWhether to prune dangling edges during compact.
Behavior3/5

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

Annotations declare destructiveHint=false despite actions like prune_events, compact, archive, and dedupe being potentially destructive. The description notes prune_events requires admin mode and provides a dry_run parameter for simulation, and dedupe uses apply for merging, but it doesn't explicitly clarify that these actions alter state. The description partially compensates by warning about permanent pruning, but it doesn't fully address the contradiction with the destructive hint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a long single sentence listing many actions and parameters, which becomes dense. It is front-loaded with the main purpose but the long list of actions feels like a wall of text. It could be more structured (e.g., grouping actions by type: health checks vs maintenance) to improve scannability.

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?

Given the tool has 10 params, no required params, and no output schema, the description covers the actions and key params but does not explain return values or what constitutes a successful execution. It lacks clarity on how the agent knows which action to choose for a given need, and doesn't explain the relationship between actions like check_refs and auto-heal or older_than vs older_than_days. There is also no mention of error conditions or side effects beyond prune_events admin requirement.

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 coverage is 100%, so all parameters have descriptions. The tool description adds context by explaining which action each parameter relates to (e.g., dry_run for prune_events, older_than for prune_events, apply for dedupe, auto_heal for check_refs). This mapping helps the agent use parameters correctly, adding value beyond the schema.

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?

The description clearly states the tool's purpose: running graph diagnostics and maintenance, listing specific actions. It distinguishes from siblings like manage_nodes, manage_edges, manage_database, and get_analytics by covering a broad set of checks and maintenance actions. However, it doesn't explicitly differentiate from manage_database which may overlap with storage maintenance actions (compact, archive, prune).

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 lists supported actions and explains some parameters (e.g., admin mode for prune_events, auto-heal for check_refs), but does not provide explicit guidance on when to use this tool versus the many siblings (manage_nodes, manage_edges, manage_database, get_analytics). The list of actions implies usage but doesn't state exactly when this tool is the right choice over alternatives.

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/putervision/state-memory-mcp'

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