Skip to main content
Glama

scan_directory

Scan directories to detect AI-generated code quality issues like hallucinated imports, phantom packages, stale APIs, and security anti-patterns across multiple programming languages.

Instructions

Scan a directory for AI-generated code quality issues. Detects hallucinated imports, phantom packages, stale APIs, security anti-patterns, and more. Supports TypeScript, JavaScript, Python, Java, Go, and Kotlin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory path to scan
levelNoSLA level: L1 (fast structural), L2 (standard + local AI), L3 (deep + remote AI)L1
languagesNoComma-separated languages (e.g. 'typescript,python'). Auto-detect if omitted.
Behavior2/5

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

With no annotations provided, the description carries full burden but only partially discloses behavioral traits. It mentions detection capabilities and language support, but omits critical details like whether the scan is read-only, its performance impact, error handling, or output format. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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?

The description is appropriately sized and front-loaded, starting with the core action and key detection categories. Both sentences earn their place by specifying scope and capabilities, though it could be slightly more structured by separating usage notes from feature lists.

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

Completeness2/5

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

Given the tool's complexity (scanning for multiple issue types across languages) and lack of annotations and output schema, the description is incomplete. It doesn't explain what the scan returns, how results are formatted, or any behavioral constraints like rate limits or permissions needed, making it inadequate for full contextual understanding.

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 all parameters well. The description adds minimal value beyond the schema by mentioning language support, which aligns with the 'languages' parameter, but doesn't provide additional syntax or format details. This meets the baseline for high schema coverage.

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 with specific verbs ('scan', 'detects') and resources ('directory', 'AI-generated code quality issues'), listing concrete detection categories like hallucinated imports and security anti-patterns. It distinguishes from sibling tools by focusing on scanning rather than explaining or healing issues.

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

Usage Guidelines3/5

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

The description implies usage for scanning directories in supported languages, but lacks explicit guidance on when to use this tool versus alternatives like 'scan_diff' or when not to use it. No prerequisites or exclusions are mentioned, leaving usage context somewhat vague.

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/raye-deng/open-code-review'

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