Skip to main content
Glama
react-best-practices

react-best-practices

by jinmoo-park

get_rule

Retrieve detailed information about a specific React/Next.js performance rule using its ID or filename, helping coding assistants reference best practices during code review.

Instructions

Get detailed information about a specific rule by ID or filename.

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": {
      "ruleId": "<ruleId>"
    },
    "name": "get_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleIdYesRule ID (filename without .md extension, e.g., "async-parallel")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
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. 'Get' implies a read-only retrieval, but the description does not cover not-found behavior, permissions, or what 'detailed information' includes. For a simple one-parameter read tool this is adequate but thin.

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 definition is a single front-loaded sentence with no wasted wording. It communicates the core operation efficiently.

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 one-parameter retrieval tool, the description is sufficient to attempt a correct call. However, without an output schema it does not explain what 'detailed information' returns, and it omits error or not-found 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 coverage is 100%, so the baseline is 3. The description says 'by ID or filename,' while the schema more precisely defines ruleId as a filename without the .md extension; the description adds little beyond the schema.

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 states a specific verb and resource: get detailed information about a specific rule. It distinguishes the tool from list/search tools by focusing on a single known rule, though it does not explicitly name sibling alternatives.

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 phrase 'by ID or filename' implies the tool should be used when the identifier is already known, which separates it from list/search operations. However, there is no explicit guidance about when to use this versus search_rules or list_rules, nor any stated exclusions.

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