scan_patterns
Scan JS/TS code for 26 security and performance patterns
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JS/TS code snippet to scan (max 50,000 chars) | |
| language | No | Language hint: javascript, typescript, jsx, tsx, etc. |
Scan JS/TS code for 26 security and performance patterns
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JS/TS code snippet to scan (max 50,000 chars) | |
| language | No | Language hint: javascript, typescript, jsx, tsx, etc. |
Changes observed during successful MCP inspections. Dates show when Glama detected each change.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action without explaining what happens after the scan, whether it is read-only, what output to expect, or any limitations. This is a significant gap for a tool with no other behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. It is concise and every word earns its place. It sacrifices some detail for brevity but is efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema and no annotations, so the description must explain the tool's return value and full context. It does not mention what the scan results look like, any constraints (though the 50k char limit is in the schema), or prerequisites. The description is incomplete for a tool expected to return pattern detection results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100% with descriptions for both 'code' and 'language'. The description adds no additional meaning beyond implying JS/TS in 'code', which is already present in the schema. Since the schema already documents both parameters, the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the specific action 'Scan' on 'JS/TS code' for '26 security and performance patterns'. This is clear and scoped. However, it does not explicitly differentiate from sibling tools like detect_antipatterns or security_check, though the mention of 26 patterns provides some uniqueness.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus the alternatives (detect_antipatterns, risk_score, security_check, suggest_refactor). It does not mention any conditions, alternatives, or exclusions, so it fails to help the agent choose the right tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.
detect_antipatterns, scan_patterns, and security_check all perform scanning with overlapping outputs, making it unclear which to call. risk_score and suggest_refactor are distinct, but the scanning tools blur together.
Most tools follow verb_noun naming (detect_antipatterns, scan_patterns, suggest_refactor), but risk_score and security_check are noun phrases, creating an inconsistent pattern.
Five tools is well-scoped for a code scanner, covering scanning, risk scoring, security status, and refactoring without unnecessary bloat.
The set covers the full analysis lifecycle from detection to risk assessment and refactoring. Missing a dedicated report or pattern listing tool, but core workflows are complete.