Skip to main content
Glama
codedev-mcp

codedev-mcp

by Kranthithota

find_long_functions

Read-onlyIdempotent

Identify functions that exceed a specified line-count threshold to flag complexity in a codebase. Filter by directory and file pattern to target long functions for review.

Instructions

Find functions that exceed a line count threshold (complexity indicator).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_long_functions"
  }
}

Input Schema

NameRequiredDescriptionDefault
directoryNoSubdirectory to search
file_globNoFilter by file pattern
thresholdNoLine count threshold (default: 50)

Output Schema

NameRequiredDescriptionDefault
checkYes
totalYes
matchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.5

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the safety profile is fully covered. The description adds only the framing that line count is a complexity proxy; it does not say whether the search recurses by default, which languages/definitions count as a function, or how results are ordered. An output schema exists, so return shape need not be explained.

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?

A single tight sentence with the core action and the qualifier front-loaded and zero wasted words. It is arguably too terse for the guidance it should carry, but nothing in it is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter, all-optional, read-only search tool with full schema coverage, an output schema, and complete safety annotations, the description covers the essentials an agent needs to decide to call it. Remaining gaps (default directory scope, recursion behavior, function-definition semantics) are minor for this complexity level.

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%, and all three parameters (directory, file_glob, threshold) are documented in the schema, including the default of 50 for threshold. The description merely restates the threshold concept and adds no syntax, units, or scoping detail beyond the schema, so the baseline 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 pairs a specific verb ("Find") with a specific resource ("functions") and a qualifying condition (line count threshold). It implicitly distinguishes itself from file-level siblings like find_large_files by scoping to functions, but it never names an alternative explicitly.

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?

Usage is only implied: an agent can infer this is for locating overly long functions as a complexity smell, and the parenthetical "(complexity indicator)" frames intent. There is no statement of when to prefer it over find_large_files, find_duplicates, or code_metrics, and no exclusions or prerequisites.

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