Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
versionNo
max_tokensNo
package_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it: it discloses the exact return shape, truncation semantics (cut at a line boundary with a trailing note), the error object, nullability of publisher/likes/pub_points, and a cached flag. It stops short of noting rate limits or caching/TTL behavior beyond the flag.

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?

Front-loaded one-line purpose followed by tight Args and Returns blocks; the field enumeration of the return object is long but justified by the absence of an output schema. Minor redundancy in re-explaining truncation and token counts, but nothing egregious.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-param tool with no annotations and no output schema, the description covers purpose, every parameter, the full return contract, truncation, and the error case. Nothing an agent needs to invoke or interpret the call correctly appears missing.

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 description coverage is 0%, so the description must compensate and it does: package_name is called out as exact and case-sensitive with an example, version is optional with a 'latest' default and example, and max_tokens is defined as a rough budget with a 1 token ≈ 4 chars conversion and cut behavior.

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?

Specific verb+resource: 'Fetch pub.dev package metadata plus its README as markdown.' It is clearly distinct from siblings like flutter_docs (documentation), flutter_search (search), and flutter_mentions, so an agent can route to it without ambiguity.

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?

Usage is implied through the args section (need an exact package name, optional version) rather than stated. There is no explicit 'use this when... / not when...' and no named alternative, though none of the listed siblings competes for package-metadata retrieval.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.