Skip to main content
Glama
aferreiraguido

javascript-mcp-server

find_command_injection

Detect command injection vulnerabilities in JavaScript or TypeScript code by flagging exec, execSync, and spawn calls that use variable interpolation.

Instructions

Possible command injection (heuristic): exec/execSync/spawn with variable interpolation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName or path of the loaded project
Behavior3/5

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

No annotations are present, so the description must disclose behavioral traits. It does so by labeling the check as 'heuristic' and 'possible', indicating the results may not be definitive, and by specifying the exact code patterns inspected. However, it does not explicitly state that the tool is read-only or side-effect-free, nor does it describe the output format, leaving some ambiguity for the agent.

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 a single, tightly packed sentence that immediately communicates the tool's purpose and heuristic pattern. It contains no redundant or filler content, achieving high conciseness while preserving all essential information.

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

Completeness4/5

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

For a one-parameter tool with no output schema, the description adequately covers what the tool does and the specific vulnerability pattern it targets. It omits an explicit statement of return value structure, but this is not mandated given the absence of an output schema. The combination of purpose, heuristic caveat, and pattern list yields a reasonably complete context.

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?

The schema already fully describes the single parameter 'name' as 'Name or path of the loaded project', providing 100% coverage. The tool description adds no additional parameter-level detail, so a baseline score of 3 is appropriate.

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 specifies the tool's function: to find possible command injection vulnerabilities through a heuristic approach, explicitly listing the affected API calls (exec/execSync/spawn) and the pattern (variable interpolation). This directly distinguishes it from sibling vulnerability scanners like find_sql_injection and find_xss_vectors.

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 this tool is for command injection detection within a broader security analysis workflow, and sibling tools cover other vulnerability types. However, it provides no explicit guidance on when to choose this tool over alternatives, nor does it mention exclusions like other scanner tools or specific project types.

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/aferreiraguido/javascript-mcp-server'

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