Skip to main content
Glama

smell_detect_long_methods

Scan a project directory to identify methods and functions exceeding a configurable line limit, highlighting code that should be broken down for maintainability.

Instructions

Find methods and functions that are too long and should be broken down

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoAPI key for Pro/Enterprise
directoryYesProject directory to scan
max_linesNoMaximum lines before flagging a function
Behavior2/5

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

There are no annotations, so the description alone must disclose behavior. It says only that the tool finds long methods/functions, but it does not state whether the analysis is read-only, what threshold or scanning behavior is used, how results are returned, or whether any code is modified. This is a significant transparency gap.

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, well-structured sentence with no filler. The core action and target are front-loaded, and every word adds meaning.

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 scan tool with schema-documented parameters, the description is minimally viable. However, with no output schema or annotations, it omits expected result format, language support, and whether the tool only reports findings or also suggests/executes refactors, leaving clear gaps.

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%, with all three parameters (api_key, directory, max_lines) already documented in the input schema. The description adds no parameter meaning beyond the schema, matching the baseline of 3.

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 (Find), a concrete resource (methods and functions), and a defining criterion (too long and should be broken down), so an agent can see this is a code-length smell detector. It is clear but does not explicitly contrast with sibling smell detectors like smell_detect_god_classes or smell_detect_feature_envy, so it falls just short of a 5.

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 the tool is used to locate long methods/functions that are refactoring candidates. It provides no explicit when-to-use/avoid guidance and does not mention alternatives, leaving the agent to infer the call context from the name and description.

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/barnburner121/claude-plugin-marketplace'

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