Skip to main content
Glama

Moltline Code Review & AI-Code Verifier

Complexity Report

complexity_report
Read-onlyIdempotent

Report structural complexity of a source file, function by function. FREE.

Measures per-function length, max nesting depth, and a cyclomatic-style branch count (if/for/while/case/&&/||/except), flagging functions too long or too deeply nested to review confidently. Typical input {"code": ""} returns {"functions": N, "detail": [{"name": ..., "start": N, "lines": N, "branches": N, "max_depth": N}], "flags": ["..."], "note": "..."}.

Use when structure rather than correctness is the question. Not for vulnerabilities (security_deep_dive). Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""}. Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesFull source text to analyze, pasted as a single string.
languageNoOptional language hint, e.g. "python" or "javascript"; "auto" (default) detects from syntax.auto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.7/5.0
Behavior5/5

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

With annotations already declaring readOnlyHint=true and idempotentHint=true, the description further enhances transparency by explaining the error behavior: 'this tool never raises a protocol error — it returns {"error": ...}'. It also explicitly states that retrying is safe: 'after correcting the input it is always safe to retry'. No contradictions with annotations.

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 very efficient. It starts with a clear single-purpose statement, then lists metrics. Uses whitespace effectively 'FREE' to highlight key aspect. The multi-line structure is readable. Every sentence is necessary, and the example input/output clarifies the tool's behavior without extra fluff.

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

Completeness5/5

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

Given the tool has 2 parameters (1 required), 100% schema coverage, and an output schema, the description fully covers the usage. The description explains the output structure ('functions, detail array with name/start/lines/branches/max_depth, flags, note'). It also explains the error case behavior. Nothing is missing for this tool's 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%, so the baseline is 3. The description adds context about the `code` parameter format ('Full source text to analyze, pasted as a single string.') but does not add significant meaning beyond the schema. The language parameter is also described adequately. No deduction needed as schema fully covers 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 clearly states the tool's purpose: 'Report structural complexity of a source file, function by function.' It uses specific verbs like 'Report' and identifies the resource as a source file's complexity. It also distinguishes itself from siblings like 'security_deep_dive' by noting it's for structure, not vulnerabilities.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'Use when structure rather than correctness is the question.' It also clearly states when not to use it: 'Not for vulnerabilities (security_deep_dive).' This directly addresses when-to-use and when-not-to-use, making it a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: AI smell detection, structural complexity, persona loading, checklist generation, diff risk scanning, secret scanning, and security deep dive. No two tools overlap in function, and descriptions explicitly state what each should not be used for.

Naming Consistency4/5

All tool names use snake_case and are readable. However, the pattern varies: some are verb_noun (get_reviewer_persona, secret_scan) while others are noun phrases (complexity_report, review_diff). This minor inconsistency prevents a perfect score.

Tool Count5/5

Seven tools cover the code review domain well without being excessive. Each tool addresses a specific aspect of code quality, security, and AI authorship detection. The scope is focused and no tool seems superfluous.

Completeness4/5

The tool set covers most analysis needs for code review: full-file scans, diff analysis, secret detection, security audit, and context like persona and checklist. A minor gap is the lack of an aggregation tool to combine results into a unified review report, but the core analysis workflows are complete.

Resources