Skip to main content
Glama

frontend_security_detect_typosquatting

Read-onlyIdempotent

Detect typosquatting in frontend package names by comparing against a curated corpus of top 500 packages, returning risk level and closest match.

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
ecosystemNoPackage ecosystem: npm or pypi. Default npm.npm
package_nameYesPackage name e.g. requests. Required.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.1.16
    • addedInput schema / properties / ecosystem / description
      Added value: +"Package ecosystem: npm or pypi. Default npm."
    • addedInput schema / properties / package_name / description
      Added value: +"Package name e.g. requests. Required."
  2. Addedv2.1.15

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds algorithmic detail (Damerau-Levenshtein distance ≤ 2) and return fields, confirming no side effects and idempotence. It does not contradict annotations.

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 a single paragraph that efficiently covers purpose, differentiation, algorithm, return, behavior, and a feedback fallback. It is not overly verbose, though could be slightly more streamlined.

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?

Given the simple tool with 2 parameters and high schema coverage, the description is complete: it explains purpose, usage, algorithm, output, behavior, and even includes error handling via feedback. Minor omission of error scenarios but overall sufficient.

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 coverage is 100%, with both parameters described. The description reiterates the purpose of each parameter but adds no new meaning beyond what the schema provides. Baseline 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 states the tool's purpose: 'Typosquatting detection optimised for the top 500 frontend packages'. It lists exemplar packages and distinguishes itself from the sibling tool 'security_detect_typosquatting' by specifying it is for frontend packages and has fewer false positives.

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?

The description explicitly says when to use: for frontend packages, and when not to: for backend packages use 'security_detect_typosquatting' instead. This provides clear guidance and alternative.

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

Deploy Server

Other Tools