Skip to main content
Glama

frontend_security_frontend_security_detect_typosquatting

Check if a package name is a typosquat of a known frontend package, reducing false positives by focusing on the top 500 frontend packages. Uses Damerau-Levenshtein distance to identify close matches.

Instructions

Typosquatting detection optimised for the top 500 frontend packages (React, Vite, Axios, Lodash, etc.). Fewer false positives than a full npm scan. For backend packages, use security_detect_typosquatting instead. package_name: Package name to check. Required. ecosystem: npm or pypi — default npm. Uses Damerau-Levenshtein distance ≤ 2 against a curated frontend-package corpus. Returns is_likely_typosquat, closest_match, distance, and risk_level (LOW/MEDIUM/HIGH). Read-only. No side effects. Idempotent. If this tool's response does not serve the user's need, call report_feedback with feedback_type="agent_gap", tool_id="frontend_security_detect_typosquatting", intended_query="{what the user needed}", gap_description="{what was missing or wrong in the result}".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYes
ecosystemNonpm

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite no annotations, description fully discloses behavior: read-only, no side effects, idempotent; uses Damerau-Levenshtein distance ≤ 2 against curated corpus; returns risk levels (LOW/MEDIUM/HIGH). No hidden surprises.

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?

Front-loaded with purpose and optimization context. Slightly long due to algorithm details and fallback feedback instruction, but every sentence adds value. Could be trimmed slightly without losing essential info.

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?

Covers all aspects: purpose, usage guidance, behavioral transparency, parameter semantics, and even fallback feedback mechanism. With output schema present (not shown but implied), description provides complete context for effective tool invocation.

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 has 0% coverage (no parameter descriptions), but description adds full meaning: package_name required, ecosystem defaults to npm, restrictions (enum). Explains algorithm and output fields, compensating completely.

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?

Description clearly states it detects typosquatting for frontend packages, naming top packages (React, Vite, Axios, Lodash). Distinguishes from sibling security_detect_typosquatting for backend packages. Purpose is specific and well-defined.

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 provides when to use (top 500 frontend packages) and when not to (backend packages), directing to sibling tool. Mentions fewer false positives than full npm scan, guiding appropriate selection.

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

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