Skip to main content
Glama
Graph-Memory

Graph-Memory

Validate Graph Entities

graph_validate
Read-only

Scans recent extraction batches for generic names, reference language, isolated low-confidence entities, and near-duplicates before bad data enters the graph.

Instructions

Scan recently extracted entities and edges for quality issues: generic names, reference language, isolated low-confidence entities, and near-duplicate names. Call this after a dream process extraction batch to catch bad data before it settles into the graph. Returns {total_issues, by_severity, scope, issues}, where issues holds up to max_issues records of shape {entity_id, name, type, issue, severity} and severity is high/medium/low. Read-only — pair with graph_delete or graph_unmerge to act on flagged items.

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": "graph_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_issuesNoMaximum number of issues to return (default 50).
source_sessionNoLimit checks to entities extracted in this session. Omit to scan the whole graph.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.2
  2. Removedv0.1.4
  3. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the sole readOnlyHint annotation: it discloses the return shape {total_issues, by_severity, scope, issues}, the per-issue record fields, the severity taxonomy, and the max_issues cap on result size. It also clarifies scoping semantics (omit source_session to scan the whole graph) and marks the operation as read-only with suggested remediation tools.

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?

Three sentences, front-loaded with purpose, then timing, then return contract and remediation. Every clause carries information an agent needs; there is no restatement of the title or filler.

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

Completeness5/5

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

No output schema exists, and the description compensates fully by documenting the response structure, severity levels, and truncation behavior. Combined with the scoping note and remediation pairing, an agent has everything needed to call it and act on the results.

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 the baseline is 3. The description still adds meaning by tying max_issues to the returned issues array ('up to max_issues records') and by restating the source_session scoping rule in terms of the scan's coverage, which helps an agent reason about results rather than just pass values.

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 (scan) and resource (recently extracted entities and edges) and enumerates the exact defect classes it looks for: generic names, reference language, isolated low-confidence entities, near-duplicates. This distinguishes it from sibling diagnostics like graph_contradictions or graph_audit without needing to open any 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 a concrete trigger ('after a dream process extraction batch') and a rationale ('before it settles into the graph'), plus explicit follow-up routing to graph_delete/graph_unmerge. It stops short of naming the other read-only diagnostics (graph_audit, graph_contradictions) as alternatives to prefer when the concern is different, so the when-not-to-use side is implied rather than stated.

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