pub_package
Fetch pub.dev package metadata and its README as markdown, with optional version selection and token-limited output for AI coding agents.
Instructions
Fetch pub.dev package metadata plus its README as markdown.
Args: package_name: exact pub.dev package name (case-sensitive), e.g. "dio". version: optional specific version, e.g. "5.4.0" (default: latest). max_tokens: rough token budget for the returned README (1 token ≈ 4 chars); longer output is cut at a line boundary with a trailing note.
Returns {"name", "version", "description", "publisher", "likes", "pub_points",
"url", "readme", "truncated", "tokens", "source_tokens", "max_tokens",
"cached"} or {"error", "suggestion"} on failure. truncated is true when
the README was cut, in which case a truncation block explains the cut
and tokens / source_tokens give the returned / full-page estimates.
publisher / likes / pub_points may be null when pub.dev does not report them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | No | ||
| max_tokens | No | ||
| package_name | Yes |