Package Metadata
Problem
You need structured metadata for a specific package — its exports, related packages, available doc pages, and category — to guide further tool calls or code generation.
Solution
Call get-package with packageSlug to get a single PackageMeta object for that package.
json
{ "name": "get-package", "arguments": { "packageSlug": "courier" } }Result:
json
{
"name": "@vielzeug/courier",
"slug": "courier",
"version": "3.0.1",
"description": "Unified HTTP client with explicit cache keys, direct mutations, and streams",
"category": "http",
"keywords": ["http", "fetch", "cache", "mutation"],
"exports": ["createCourier", "CourierError", "withBearerAuth"],
"related": ["flux", "ripple", "spell"],
"availableDocPages": ["index", "api", "usage", "examples"],
"exampleIds": ["create-courier"],
"hasSource": true
}PackageMeta never includes full docs content, apiSource, example code, or typeSignatures. Use get-docs, get-source, get-example, and get-type-signature to retrieve those.
Pitfalls
PackageMetastripsdocs,apiSource,examples, andtypeSignaturesfrom the full package record (reducingexamplestoexampleIds). It is a summary, not the complete data.relatedcontains slugs, not package names. Use them directly aspackageSlugin subsequentget-packageorget-docscalls.hasSource: falsemeans nosrc/index.tswas bundled for this package;get-sourceandget-type-signaturewill returnisError: truefor it.- An unknown
packageSlugreturnsisError: truewith available slugs listed — not an empty object.