Skip to main content
Glama
aferreiraguido

javascript-mcp-server

find_react_memo_opportunities

Identify React components receiving non-primitive objects, arrays, or functions without memo(), and flag JSX creating new values per render to suggest React.memo usage.

Instructions

Components with non-primitive props (objects/arrays/functions) without memo() and JSX with new values per render (performance heuristic).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName or path of the loaded project
Behavior2/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 of behavioral disclosure. It discloses the matching criteria but not the operation itself (e.g., that it scans the loaded project, returns a list, and is read-only). The input parameter mentions 'loaded project', but the description does not clarify behavior if the project is unloaded or what the output structure looks like.

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?

The description is a single sentence that front-loads the key criteria. It is concise and avoids unnecessary words. However, the phrasing is dense and technical, which might require React expertise to fully parse, but it remains efficient.

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?

With a simple one-parameter schema and no output schema, the description leaves significant gaps: it does not mention what the tool returns, whether it operates on a loaded project or a path, or how it differs from similar analysis tools like find_react_effect_leaks. The criteria are stated, but the tool's actual behavior and return value are not explained.

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% since the single 'name' parameter has a clear description ('Name or path of the loaded project'). The tool description adds no additional parameter semantics beyond what the schema provides, so the baseline score of 3 applies.

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 defines the target pattern (components with non-primitive props without memo() and JSX new values per render), clearly indicating what the tool finds. Though it lacks an explicit verb, the tool name 'find_react_memo_opportunities' provides the action. It distinguishes from sibling tools like analyze_react_component by focusing specifically on memoization opportunities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use guidance is provided. The phrase 'performance heuristic' implies usage for performance optimization, but no alternatives or exclusions are mentioned. An agent has to infer context from the tool name and sibling list, which is insufficient.

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/aferreiraguido/javascript-mcp-server'

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