Skip to main content
Glama

execute_custom_rules

Executes all custom rules against code or a file, optionally filtered by language, to detect technical debt violations and prioritize remediation.

Instructions

Execute all custom rules against code or a file.

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

Input Schema

NameRequiredDescriptionDefault
codeNoCode content to analyze (alternative to path)
pathNoPath to the file to analyze
languageNoOptional: programming language for filtering rules

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description must disclose safety and behavior. It says 'Execute' but does not clarify whether the operation is read-only analysis or has side effects, what permissions are required, or what results are returned. This leaves important behavioral traits undisclosed.

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 single sentence is front-loaded and free of filler. It is efficiently sized for a short tool definition.

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

Completeness2/5

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

For a tool with three optional parameters, no annotations, and no output schema, the definition is thin. It does not explain the execution result, ordering, or how custom rules are selected, so an agent lacks context needed to call it confidently.

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 100%, so the schema already documents code, path, and language. The description only restates that rules run against code or a file, adding little beyond the schema and not explaining the optional language filter.

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 names a specific verb ('Execute') and resource ('all custom rules') and states the target ('code or a file'). It is distinguishable from sibling management tools such as list_custom_rules and add_custom_rule, though it does not explicitly contrast with analysis tools like analyze_file.

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?

It implies the tool is used to run custom rules against code or a file, but gives no explicit when-to-use conditions, prerequisites, or guidance on when to prefer validate_custom_pattern or analyze_file. The code-or-path input hint is useful but not a usage rule.

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