Skip to main content
Glama

Ai Code Smell Scan

ai_code_smell_scan
Read-onlyIdempotent

Flag the tells of unreviewed AI-generated code in a source file. FREE.

Detects comments that restate the next line, leaked assistant preambles, placeholder TODOs, shipped 'Example usage' blocks, over-broad try/except that swallows errors, and auto-named identifiers. Typical input {"code": ""} returns {"reviewed_confidence": 0-100, "hits": [{"smell": "...", "evidence": ""}], "reading": "...", "note": "..."}.

Use on a full source file suspected of unreviewed machine authorship. Not on a diff (review_diff), and the result is a signal to check, not proof of authorship. 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 scan, any language; paste the file contents as a single string.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds that every call is read-only and idempotent, discloses error behavior (never raises protocol error, returns descriptive error object), and notes the output is a confidence signal, not definitive proof. No contradiction 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?

Front-loaded with purpose, then enumerates smells, IO format, usage guidance, and error handling. Every sentence adds value; no fluff. Efficiently structured for an agent to quickly understand.

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 output schema exists (context signals indicate present), the description still outlines return format ('reviewed_confidence', 'hits', etc.) and error format. Covers input, output, behavior, and error handling completely for a single-parameter tool with good annotations.

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

Parameters5/5

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

Schema description coverage is 100% for the single 'code' parameter. The description adds context: 'paste the file contents as a single string', provides typical input format, and explains what the tool looks for (list of smell types), going beyond the schema's basic description.

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 flags indicators of unreviewed AI-generated code in a source file, lists specific smells (e.g., placeholder TODOs, over-broad try/except), and distinguishes from sibling 'review_diff' by stating it is not for diffs.

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?

Explicitly says 'Use on a full source file suspected of unreviewed machine authorship. Not on a diff (review_diff)', and clarifies the result is a signal, not proof. Also explains error handling: never raises protocol error, returns an error object, so it is safe to retry after fixing input.

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 targets a distinct analysis area: AI-generated code smells, structural complexity, reviewer persona, review checklist, diff risk scanning, secret scanning, and OWASP security deep dive. Even though review_diff and security_deep_dive both touch security, one is diff-based and the other is full-file, and descriptions clarify the difference.

Naming Consistency4/5

All names use snake_case, but there is a mix of verb-first (ai_code_smell_scan, get_reviewer_persona, secret_scan) and noun-first (complexity_report, review_checklist, review_diff, security_deep_dive) patterns. This is mostly consistent but the verb usage varies (scan, get, report, checklist, dive).

Tool Count5/5

7 tools is well-scoped for a code review analysis server. Each tool serves a specific purpose without overlap, covering multiple angles (AI smells, complexity, security, secrets, diff review, checklist, persona) without being overwhelming.

Completeness4/5

The tool set covers essential static analysis tasks for code review: structural, security, secret detection, and AI-generated code detection. It also provides supporting tools (checklist, persona). A minor gap is the lack of an integrated tool that produces a consolidated review summary or comment generation from findings.

Resources