Skip to main content
Glama

scan_code_for_violations

Statically scan code for placeholder stubs, TODO/FIXME markers, and scaffold deception phrases before delivery. Returns line-numbered findings with a PASS/REVIEW/FAIL verdict.

Instructions

Statically scan code for Zero-Framework-Tolerance violations: TODO/FIXME markers, stub bodies (pass, ellipsis, NotImplementedError, unimplemented macros, panic stubs), empty function and catch bodies across Python, JavaScript, TypeScript, Java, Go and Rust, scaffold deception phrases ('rest of the implementation', 'omitted for brevity'), and iteration-deferral phrases ('left as an exercise', 'you can extend this'). Backed by the CodebaseCSI forensic detector plus Constitution prose rules; Python input additionally gets AST analysis so abstract stubs (Protocol/ABC/@abstractmethod) and markers inside string literals are not falsely flagged. Returns a JSON verdict (PASS/REVIEW/FAIL) with line-numbered findings. Use before delivering generated code. A PASS is necessary but not sufficient - still run gates G1-G5.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe complete code to scan.
languageNoOptional language hint, e.g. 'python', 'javascript', 'typescript', 'java', 'go', 'rust'. Selects the string-masking strategy and enables Python AST analysis. Omit to infer automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.6.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the underlying detector (CodebaseCSI) plus prose rules, the Python-specific AST behavior that prevents false positives on Protocol/ABC/@abstractmethod and markers in strings, and the exact return shape (PASS/REVIEW/FAIL with line numbers). This is unusually rich behavioral disclosure for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One long but densely packed sentence front-loads the enumerated violation classes, followed by the mechanism, return format, and usage note. Every clause earns its place, though the first sentence is heavy enough that a reader must parse carefully.

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?

Despite the absence of an output schema, the description explains the return value (PASS/REVIEW/FAIL verdict with line-numbered findings) and the follow-up obligation. For a two-parameter scanning tool this is complete enough for an agent to call and interpret 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%, so the schema already documents both 'code' and 'language'. The description's mention of string-masking and Python AST ties to the language parameter's effect, but adds no syntax or format detail beyond the schema. Baseline 3 is appropriate when the schema does the work.

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?

States a specific verb (statically scan), resource (code), and enumerates the exact violation classes detected. An agent can immediately distinguish this from siblings like review_patch or verify_dependencies, which do not perform static violation scanning.

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?

Provides clear context: 'Use before delivering generated code' and explicitly routes to a follow-up path by naming gates G1-G5 and warning that a PASS is not sufficient. It doesn't name a specific sibling tool as an alternative, but the timing trigger and hand-off are concrete.

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