Skip to main content
Glama
JrKrishh
by JrKrishh

Most complex files

most_complex_files
Read-only

Identify complex files by cyclomatic complexity to pinpoint refactoring targets without reading the entire codebase.

Instructions

Ranks modules by cyclomatic complexity so you can find refactoring targets without reading the codebase.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoHow many files to return (1-50)
directoryYesAbsolute or relative path to the source directory to analyse
Behavior4/5

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

The description discloses the core behavioral trait: ranking modules by cyclomatic complexity. Annotations already mark it as read-only, so no safety contradictions exist. While it does not detail traversal or filtering behavior, the metric and ranking intent are clearly stated, which is sufficient for a simple read-only analysis tool.

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 sentence of 15 words, front-loaded with the action verb. It efficiently conveys both the operation and the motivation without unnecessary repetition or filler.

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?

The tool is straightforward, and the description, combined with the well-documented schema and read-only annotation, gives enough context. There is no output schema, but the ranking nature implies the return format, and the description's 'ranks' likely implies an ordered list. No major gaps are evident for a tool of this complexity.

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 already provides descriptions for both parameters (directory and limit) with 100% coverage. The description itself does not add any additional meaning about parameters, so it meets the baseline of 3 without exceeding it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Ranks') and resource ('modules') and identifies the exact metric (cyclomatic complexity) and purpose (finding refactoring targets). This clearly distinguishes it from sibling tools like find_entry_points or find_circular_dependencies, which focus on different aspects of code analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'so you can find refactoring targets' provides a clear context for when to use the tool. However, it does not explicitly mention alternatives or when not to use it, though the specificity of complexity ranking implicitly separates it from siblings.

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/JrKrishh/sove-mcp'

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