Skip to main content
Glama
CodeHealth MCP Server

CodeHealth MCP Server

rules_config_validate

Validate .codehealth/rules.json after edits to catch structural errors, invalid rule names, and unknown threshold names before running code health checks.

Instructions

Validate the repository's code health rules file.

When to use: after editing .codehealth/rules.json.
Limitations: checks structure, rule names and threshold names only.
Returns: {rules_file, valid, errors}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repository_path": "<repository_path>"
    },
    "name": "rules_config_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
repository_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

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 burden and does disclose a real limitation: it checks structure, rule names, and threshold names only, which implicitly tells the agent it will NOT catch bad values or semantic errors. It does not explicitly state that validation is read-only and non-mutating, which would have closed the loop.

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 short labeled lines — purpose, when-to-use, limitations, return shape — with no filler. The structure is front-loaded and every sentence earns its place.

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

Completeness4/5

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

For a low-complexity single-parameter validator, the description covers purpose, timing, and scope limits adequately. The return-value line partly duplicates the existing output schema, and the undocumented repository_path is the one real hole.

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?

There is a single required parameter, repository_path, at 0% schema coverage, and the description says nothing about its expected form (local filesystem path vs. repository identifier). It does not compensate for the coverage gap, but with only one obvious parameter the risk of misuse is modest.

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?

States a specific verb and resource: validate the repository's code health rules file. That is clearly distinct from the mutating siblings (rules_config_set_rule, rules_config_set_threshold), though it never names an alternative to disambiguate against, so it stops short of a 5.

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 an explicit trigger: 'after editing .codehealth/rules.json', which tells the agent exactly when this call is appropriate. It offers no when-not guidance or pointer to what to use instead if validation fails (e.g., the set_rule siblings), leaving that to inference.

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