Skip to main content
Glama

find_long_functions

Lists functions and methods exceeding a configurable line-count threshold to flag scope creep and high complexity for refactoring.

Instructions

List functions and methods over a line-count threshold. Long functions are a proxy for scope creep and often correlate with high complexity.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
limitNo
min_linesNo
repo_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
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 behavioral burden and falls short: it does not state that this is a read-only analysis, how results are ordered or truncated by 'limit', or how paths are resolved. The only added context is interpretive rationale for why long functions matter, which helps judge results but not invoke the tool safely.

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?

Two sentences, front-loaded with the concrete behavior, and the rationale follows rather than precedes the definition. No filler or redundant restatement of the tool name.

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?

An output schema exists, so return-value explanation is not required, and the core purpose is covered. However, with zero annotation coverage and zero schema parameter documentation, the definition leaves invocation details (defaults, limits, path expectations) and tool-selection guidance unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for three parameters. The phrase 'line-count threshold' implicitly maps to min_lines and 'functions and methods' hints at repo_path, but the default of 50, the unit of 'limit', and path semantics are never explained, so the description only partially compensates for the coverage gap.

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?

States a specific verb and resource ('List functions and methods') plus a quantitative scope ('over a line-count threshold'), so the agent knows exactly what is returned. It does not name any sibling such as find_complexity, so differentiation is left implicit even though the line-count framing is distinct.

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?

The second sentence gives a rationale ('proxy for scope creep... correlate with high complexity') but never says when to pick this tool over find_complexity or find_god_files, and gives no exclusions or prerequisites. The agent must infer the selection criteria from the sibling names alone.

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