Skip to main content
Glama
aferreiraguido

javascript-mcp-server

find_unused_variables

Find unused top-level variables in JavaScript/TypeScript files to clean up dead code and improve maintainability.

Instructions

Module-level (top-level) variables that are not used in the rest of the file.

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. It reveals the analysis scope (module-level, top-level) and the criterion (unused in rest of file) but does not disclose whether exported variables are considered used, what 'used' means (read vs referenced), or the output format (names, locations). The description is a definition, not a behavioral specification, leaving important edge cases unexplained.

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, concise fragment that directly defines what the tool returns. It is appropriately sized for a simple tool and front-loads the key scope. The lack of a verb makes it slightly less polished, but it is efficient and free of redundancy.

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 no output schema, the description should explain return values or behavioral details, but it only defines the topic. It does not state whether results are a list of names, include line numbers, or how exports are treated. For a tool with one parameter and no output schema, more context is needed to fully prepare an agent for invoking it.

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?

The input schema covers the only parameter 'name' with a description ('Name or path of the loaded project'), giving 100% schema coverage. The tool description adds nothing about the parameter, but per the baseline, schema coverage is sufficient. No additional parameter nuance is needed for this simple one-parameter tool.

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 clearly identifies the target: module-level (top-level) variables not used in the rest of the file. It distinguishes from sibling tools like list_variables (which lists all variables) and find_dead_code (broader dead code) by specifying scope. However, it lacks an explicit verb like 'Finds' or 'Lists', making it a definitional fragment rather than a full purpose statement.

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: use when you need to identify unused top-level variables. It provides the condition (not used in rest of file) but offers no explicit when-not-to-use, prerequisites (e.g., project must be loaded beyond the parameter name), or alternative tools. With many siblings covering similar analyses, explicit guidance would strengthen this.

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