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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ecosystem": "<ecosystem>",
"package_name": "<package_name>"
},
"name": "docs_get_package_info"
}
}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'. |