Skip to main content
Glama
CodeHealth MCP Server

CodeHealth MCP Server

rules_config_set_rule

Set a code smell rule's weight in the repository rules file to silence or soften it for specific paths; set weight to 0 to disable the rule.

Instructions

Set a rule's weight in the repository rules file (0 disables the rule).

When to use: to silence or soften a smell for part of a repository.
Limitations: writes the rules file in the repository root; the first
matching rule set wins, so a new specific glob is placed first.
Returns: {rules_file, rule, weight, matching_content_path}.

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>",
      "rule_name": "<rule_name>",
      "weight": "<weight>"
    },
    "name": "rules_config_set_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
weightYes
rule_nameYes
repository_pathYes
matching_content_pathNo**/*

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden and does disclose the side effect (writes the rules file at repository root) and the first-match-wins ordering. It omits permission/auth requirements, whether an existing matching rule is overwritten versus duplicated, and whether the file is created if absent.

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?

Labeled sections (When to use, Limitations, Returns) front-load the purpose and keep each sentence functional. The Returns line duplicates the output schema slightly, which is minor waste.

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 four-parameter mutation tool with no annotations, the description covers the write side effect, ordering rule, disable semantics, and return fields, and an output schema exists to define the response. Only permission and overwrite/edit-conflict behavior remain unstated.

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 coverage is 0%, so the description must compensate for all four parameters. It explains the weight semantics (0 disables) and implies matching_content_path via 'new specific glob' and repository_path via 'repository root', but rule_name and the glob default '**/*' are left for the agent to infer.

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 ('Set a rule's weight in the repository rules file') and adds the key semantic that 0 disables the rule. It distinguishes itself from the threshold sibling by naming the rules-file/rule-weight object, though it never explicitly contrasts with rules_config_set_threshold.

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 'When to use' line gives a concrete scenario: silencing or softening a smell for part of a repository. There are no exclusions or named alternatives, so an agent must infer that threshold tuning belongs to the sibling tool.

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