Get Package Info
docs_get_package_infoFetch live package metadata from npm, PyPI, or crates.io: get exact version, description, and repository URLs. Ensure accuracy by querying the registry directly, with clear errors for missing packages.
Instructions
Fetch real, current metadata for a package directly from the npm registry, PyPI JSON API, or crates.io.
This tool makes a live HTTP request to the actual registry (registry.npmjs.org, pypi.org, or crates.io) at call time. It never returns cached, guessed, or simulated data — if the package doesn't exist, it returns an explicit error rather than a plausible-looking fabrication.
Args:
ecosystem ('npm' | 'pypi' | 'cargo'): which registry to query
package_name (string): exact package name, e.g. "zod", "fastapi", or "serde"
Returns JSON with: name, latest_version, description, homepage, repository, source_url (the exact registry URL the data came from, for verification), fetched_at (ISO timestamp).
Error Handling:
Returns "Error: package not found" if the registry has no such package
Returns "Error: registry request failed" on network/HTTP errors
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ecosystem | Yes | Which package registry to query: 'npm', 'pypi', or 'cargo' (Rust/crates.io). | |
| package_name | Yes | Exact package name as published on the registry, e.g. 'express', 'requests', or 'serde'. |