Skip to main content
Glama

set_custom_rule

Add or update a custom code analysis rule, creating a ruleset if needed. Define patterns, replacements, and severity to enforce project-specific standards.

Instructions

Add or update a custom code analysis rule. Creates ruleset if it does not exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleYesRule definition with id, name, description, pattern, patternType, replacement, severity, filePattern
ruleSetYesName of ruleset (e.g., "symbiote", "react", "custom")
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the side-effect of creating a ruleset if it does not exist, and 'Add or update' implies an upsert behavior. However, it does not mention whether existing rules are overwritten, permissions required, or what the return value or error states look like.

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 two sentences, front-loaded with the action ('Add or update'), and includes the key side-effect. Every word earns its place, with no filler or redundant information.

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?

For a simple write tool with no output schema and no annotations, the description covers the main purpose and the ruleset-creation side-effect. However, it lacks detail on what happens on success/failure, whether rules are overwritten, and any validation behavior, which would be helpful for an agent to fully understand the tool's behavior.

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% for both parameters, so the schema already documents ruleSet and rule. The tool description adds no additional meaning about how to format or use the parameters, so the baseline score of 3 is appropriate.

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 clearly states the tool's action ('Add or update') and resource ('custom code analysis rule'), and adds the side-effect of creating a ruleset if needed. It is specific and distinct from sibling tools like get_custom_rules and check_custom_rules, which are read-only.

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 description implies usage for adding/updating rules but does not explicitly state when to use this tool versus the read-only sibling tools (e.g., get_custom_rules, check_custom_rules). The context of 'set' vs 'get'/'check' provides implied guidance, but no explicit exclusions or alternatives are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rnd-pro/project-graph-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server