Skip to main content
Glama

analyze_reachability

Determine if a package is actually imported in your project by statically scanning source files, classifying usage as production or test-only for Python, npm, Maven, and Gradle.

Instructions

Analyze a project to determine whether a package is actually imported.

Statically scans source files for imports of the given package and
classifies each usage as production or test-only. Supports Python
(PyPI), JavaScript/TypeScript (npm), and Java (Maven/Gradle).

Args:
    project_path: Absolute path to the project root directory.
    package_name: Package name to look for. Use groupId:artifactId for Maven/Gradle.
    ecosystem: One of PyPI, npm, Maven, or Gradle. Determines which scanner to use.
    import_names: Override the import name when it differs from the package name
                  (e.g. ["bs4"] for beautifulsoup4, or a Java package prefix).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ecosystemNoPyPI
import_namesNo
package_nameYes
project_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
used_inNo
ecosystemYes
test_onlyYes
limitationsNo
usage_foundYes
build_systemNounknown
import_namesYes
package_nameYes
reachabilityYes
dependency_typeNounknown
internet_facingNo
dependency_evidenceNo
vulnerable_api_usedNo
production_usage_foundYes
Behavior3/5

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

With no annotations provided, the description carries full burden. It explains the behavior (static scanning, classification by environment, multi-ecosystem support) but omits details like error handling, performance implications, or limitations (e.g., dynamic imports). This is adequate but not rich.

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 concise at 4 sentences plus a bullet list for Args. It is front-loaded with the main purpose. The Args section could be slightly more compact, but every line adds value. No redundancy.

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 tool's 4 parameters (2 required, 1 enum) and the presence of an output schema, the description covers the behavioral and parameter context well. It does not mention return values, but the output schema already handles that. Overall, it is sufficiently complete for an agent to use correctly.

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 coverage is 0%, so the description fully compensates. It explains each parameter: project_path (absolute path), package_name (format for Maven/Gradle), ecosystem (enum with values), and import_names (override examples like 'bs4' for beautifulsoup4). This adds essential meaning beyond the schema's bare definitions.

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: 'Analyze a project to determine whether a package is actually imported.' It specifies static scanning and classification into production/test-only, and distinguishes from sibling tools like check_package and generate_report by focusing on actual import usage rather than package metadata or report generation.

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 provides context on supported ecosystems and parameter usage, but lacks explicit guidance on when to use this tool versus alternatives like check_package or generate_report. It does not state when not to use it, leaving the agent to infer from the broader scope.

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/arojit/vulnpilot-mcp'

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