Skip to main content
Glama
srewoo

needle-mcp

by srewoo

validate_rca

Check a draft RCA's structured claim for errors before posting. Runs deterministic linting to ensure the claim is valid and ready to publish.

Instructions

Deterministically lint a draft RCA's structured claim before you post it. Call this before finalizing any RCA, and emit the envelope fenced between BEGIN_NEEDLE_MCP_RESULT_JSON and END_NEEDLE_MCP_RESULT_JSON — on Claude Code a Stop hook re-runs this check against that block regardless.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
claim_jsonYes
investigation_logNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses that validation is deterministic, that the result should be emitted inside a specific envelope, and that a Stop hook re-runs the check. This is valuable context beyond what the schema provides, though it does not describe failure behavior or side effects.

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?

The description is compact and front-loaded: the primary purpose comes first, followed by the crucial calling convention. Every sentence earns its place, and there is no redundant restatement of the tool name or schema.

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?

The description covers when to call the tool and how to format the output envelope, which is useful. However, with no output schema and no parameter explanations, the agent still lacks enough detail to know what a valid 'structured claim' looks like or how to populate investigation_log correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description never explicitly explains claim_json or investigation_log. The phrase 'structured claim' hints at claim_json's purpose, but the agent is left without guidance on the expected claim structure, required fields, or how investigation_log affects validation.

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?

The description states a specific action and resource: 'deterministically lint a draft RCA's structured claim before you post it.' This clearly differentiates validate_rca from the sibling tools, which handle correlation, investigation planning, source queries, and visual evidence — none of which are about validating a draft claim.

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?

The description gives explicit usage context: 'Call this before finalizing any RCA.' It also explains the special Stop-hook behavior on Claude Code. It does not name alternative tools or exclusions, but the timing guidance is clear enough for an agent to know when to invoke it.

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