Skip to main content
Glama

ivd_judgment_detect_patterns

Clusters codified ledger entries by domain and normalized diagnosed cause, then promotes clusters meeting the member threshold to pattern files under .judgment/patterns/.

Instructions

Cluster codified ledger entries by (domain, normalized diagnosed_cause). Promotes any cluster with 3+ members (configurable via min_members) to a pattern file under .judgment/patterns/. Computes weighted_confidence using domain_depth and freshness using the domain baseline's pattern_half_life_days. Dormant unless .judgment/ exists. (IVD v3.0)

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

Input Schema

NameRequiredDescriptionDefault
domainNoOptional: limit to one domain.
min_membersNoPromotion threshold (default 3).
project_rootNoOptional path to repo root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.2

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it discloses a write side effect (creating pattern files under `.judgment/patterns/`), the promotion threshold default, the scoring inputs (domain_depth, freshness via pattern_half_life_days), and a dormancy condition. Gaps remain around whether existing pattern files are overwritten, whether unchanged clusters are re-promoted, and what happens to clusters below the threshold — all relevant for a mutation tool with zero annotation coverage.

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?

The description is compact and front-loads the core action before moving to threshold behavior, scoring, and the dormancy caveat. Every sentence conveys distinct information. It is dense with domain jargon (weighted_confidence, domain_depth, pattern_half_life_days) but not padded or repetitive.

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?

There is no output schema and no annotations, so the description is the only source of contract information. It covers input behavior and side effects well but never says what the call returns (e.g., cluster list, promoted file paths, counts) or how the agent should interpret a no-op when `.judgment/` is absent. For a tool whose whole point is producing artifacts, that is a meaningful omission.

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 each of the three parameters is already documented in the schema, including defaults for min_members and the purpose of domain and project_root. The description reinforces min_members as the promotion threshold and implies domain scoping, but adds no syntax, format, or edge-case meaning beyond the schema. 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?

The description uses a specific verb+resource pairing: 'Cluster codified ledger entries by (domain, normalized diagnosed_cause)' and states the concrete output artifact — pattern files under `.judgment/patterns/`. That is far more informative than the name alone. It stops short of explicitly contrasting itself with siblings such as ivd_judgment_codify or ivd_judgment_save_codified, so the agent must infer that this is the analysis/promotion step rather than the capture step.

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 clause 'Dormant unless `.judgment/` exists' gives a real precondition that tells the agent when the tool will do nothing, which is useful usage guidance. However, there is no explicit statement of when to call this versus adjacent siblings (codify, save_codified, propose_recommendation), and no note on whether it should be run repeatedly or after each codification round.

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