Skip to main content
Glama

Complexity Trend

complexity_trend
Read-only

Tracks file complexity across git history to spot out-of-control growth, spikes from specific commits, and files needing splitting.

Instructions

Track how a file's complexity has changed over time by sampling its state at regular intervals in git history. Identifies files growing out of control, complexity spikes from specific commits, and files that need splitting. NOTE: If the server was not started inside a git repo, you MUST provide repo_path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoDays to look back (default: 180)
pathYesFile path to analyze (relative to repo root)
samplesNoNumber of time samples (default: 10, max: 30)
repo_pathNoAbsolute path to the git repository to analyze. Required if Claude Code was not opened in a git repo.
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the read-only nature is established. The description adds behavioral context by explaining it samples at regular intervals in git history and can attribute spikes to specific commits. It also clarifies the repo_path requirement. It does not contradict annotations and adds meaningful detail beyond them, though it omits potential return format details.

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 three concise sentences: the main purpose, the output value, and an essential prerequisite. Each sentence earns its place, with zero fluff. It is front-loaded with the core functionality and structured logically.

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?

Given no output schema, the description provides a high-level expectation of what the tool returns (identifies files growing, spikes from commits, files needing splitting). It covers the core purpose and operational requirements. It falls short of a 5 because it doesn't explicitly describe the result format or edge cases like empty git histories, but it's sufficient for an agent to select and invoke the tool correctly.

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 each parameter clearly documented (path, days, samples, repo_path) including defaults and constraints. The description's note about repo_path adds little beyond what the schema already states, so it provides minimal extra semantic value. Baseline 3 is appropriate when the schema handles the parameter details.

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 ('Track') and resource ('a file's complexity') and clearly states the methodology (sampling git history) and outputs (identifies files growing out of control, complexity spikes, files needing splitting). This clearly distinguishes it from sibling tools like hotspots or file_history, which focus on different metrics or time-based changes.

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 description gives clear context for when to use this tool: to analyze complexity trends, detect spikes, or identify files that need splitting. It does not explicitly mention alternatives or exclusions, but the use cases are unambiguous. The repo_path prerequisite provides additional usage guidance, so the context is solid.

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/JBrightmanAI/GitIntel-MCP-Server'

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