Skip to main content
Glama
aferreiraguido

javascript-mcp-server

find_long_functions

Finds functions and methods whose bodies exceed a configurable line count, flagging technical debt for refactoring in JavaScript/TypeScript projects.

Instructions

Functions/methods with a long body (technical-debt heuristic).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName or path of the loaded project
max_linesNoBody line threshold (default 80)
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only states the heuristic nature ('technical-debt heuristic') without explaining what 'long' means, whether a configurable threshold exists (max_lines is not mentioned), what the output looks like, or if any side effects occur. The description adds little beyond the tool's name.

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 a single, tightly worded phrase that directly states the tool's purpose. There is no fluff, repetition, or unnecessary detail. It earns a top score for conciseness.

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?

The tool has no output schema and no annotations, so the description must explain what the tool returns and under what conditions. It only states 'Functions/methods with a long body' without saying that it returns a list, that it applies to the loaded project, how the max_lines threshold works, or that it is a read-only static analysis. This leaves important gaps for a tool that could return varied results.

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%; both parameters have clear descriptions ('Name or path of the loaded project' and 'Body line threshold (default 80)'). The description itself adds no parameter-specific details, but since the schema already documents them well, a baseline score of 3 is appropriate.

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 specifies the resource (functions/methods), the condition (long body), and the intent (technical-debt heuristic). It distinguishes reasonably from siblings like find_high_complexity (complexity vs. length), though it lacks an explicit verb such as 'finds' and could be more explicit about being a list-returning analysis.

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 usage guidance is provided. The description does not indicate when to prefer this over related tools like find_high_complexity, function_metrics, or find_dead_code, nor does it mention prerequisites such as the project being loaded. It is left entirely to the agent to infer context.

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