pubdev_context 0.4.0-rc.0
pubdev_context: ^0.4.0-rc.0 copied to clipboard
Model Context Protocol (MCP) server for pub.dev. Gives AI agents structured access to search, compare, evaluate, and inspect Dart and Flutter packages.
Changelog #
All notable changes to pubdev_context are documented here.
Format follows Keep a Changelog.
0.4.0-rc.0 #
Changed #
- Breaking:
get_symbol_documentationno longer accepts anhrefparameter. It now accepts asymbolparameter (required) and an optionalversionparameter. Agents pass a human-readable name ("Client","Client.send", or a fullqualifiedNamelike"http.Client") and the server resolves it to an href internally via a three-pass lookup against the cached API index. This eliminates the mandatorybrowse_api_symbols → get_symbol_documentationtwo-step for agents that already know the symbol name. - Fix:
get_symbol_documentationnow correctly resolves a fullqualifiedNameinput (e.g."http.Client") via a new Pass 0 exact-qualifiedNamematch. Previously, retrying anambiguous_symbolerror with a value from thealternativesarray always producedsymbol_not_foundbecause neither the short-name nor the suffix-match passes accepted a fully-qualified name. - Fix: Symbol-doc cache keys now include the effective version (
symbol_doc:<package>:<version>:<href>). Previously, the key omitted the version, so a cached response for one version could silently be served for a different version, and a cached 404 from one version could block valid lookups in another. browse_api_symbolsdescription updated: the outdated hint to pass thehreftoget_symbol_documentationhas been removed.- Server instructions updated to reflect the new direct-symbol workflow.
DomainErrorgains an optionalalternativesfield, included inambiguous_symbolerror payloads.- Tool
search_api_symbolsrenamed tobrowse_api_symbols. The new name reflects the tool's role as a pure discovery aid for when the symbol name is unknown;
0.3.0 - 2026-05-22 #
Added #
pub://meta/resources— new static resource that returns a JSON array of every available resource and resource template, each with its URI, MIME type, and description. Read it first to discover what the server exposes without enumerating resources manually.- Server instructions now list all six resource URIs and guide agents to read
pub://meta/resourcesbefore making resource calls.
Added (test) #
- Integration test suite in
test/integration/covering all five tools, four resources, and three lifecycle scenarios (49 tests total). Taggedintegrationindart_test.yaml; excluded from the defaultdart testrun viapaths: [test/unit]. Run withdart test test/integration/.
Changed #
- All tool, resource, resource template, and prompt descriptions rewritten as direct agent instructions. Each description states when to call it, what to do with the result, which tool to call next, and which patterns to avoid.
search_api_symbolsnow explicitly warns against multi-term queries. PubDevClientcaps concurrent HTTP requests at 5 by default, preventing429 Too Many Requestserrors when an agent issues several tool calls in parallel.
Fixed #
search_api_symbolsnow reports correct symbol kinds. Thekindinteger fromindex.jsonwas mapped to the wrong ordinal positions, causing enums to appear astypedef, mixins asconstant, and some typedefs to fall through to a raw integer string.- Package README and section extraction now uses DOM queries instead of regex. The previous approach returned content from the matched element to the end of the document and silently failed on elements with extra CSS classes, single-quoted attributes, or out-of-order class tokens.
0.2.0 - 2026-05-21 #
Added #
get_packagetool — full metadata for a named package: scores, SDK constraints, dependencies, recent versions, and README excerpt; supports optional version pinningget_changelogtool — parsed changelog as a newest-first list of entries withbreakingflags; supportsfrom_versionlower bound andversion_limitcapcompare_packagestool — side-by-sideComparisonMatrixfor 2–5 packages; partial failures are reported per package without blocking the remaining columnsget_symbol_documentationtool — full dartdoc page for a specific API symbol as plain textlist_package_source_filestool — file paths in a package tarball with optionaldirectoryandfileExtensionfilters; shares the 1-hour cache entry withget_package_source_fileget_package_source_filetool — raw content of a single source file from the pub.dev package tarball; resolves version automatically when omitted; returns closest-filename suggestions onsource_file_not_foundadd-and-setup-packageprompt — guides the LLM through reading a package README, explaining its purpose, writing boilerplate initialisation code, and listing native platform setup stepsanalyze-upgrade-impactprompt — guides the LLM through retrieving changelog entries, identifying breaking changes between two versions, and rewriting affected source codeevaluate-alternativesprompt — guides the LLM through searching for packages matching a use case, comparing the top results, and producing a recommendation with a markdown comparison matrixpub://meta/scoringresource — plain-text explanation of pub.dev's 160-point scoring system; embedded at compile timepub://meta/sdk-versionsresource — current stable Dart and Flutter SDK versions as a{ dart, flutter }JSON objectpub://package/{name}/readmeresource template — full package README astext/markdownpub://package/{name}/exampleresource template — package example code astext/markdownpub://package/{name}/apiresource template — dartdoc symbol index asapplication/jsonpub://package/{name}/changelogresource template — full changelog astext/markdown
0.1.0 - 2026-05-11 #
Added #
search_packagestool — search pub.dev by keyword with optional SDK, platform, and sort filters- In-memory TTL response cache with per-entry expiry (5-minute TTL for search results)
- CLI configuration via
--log-leveland--cache-dirflags with env var fallback - Stdio transport over stdin/stdout (via
dart_mcp ^0.5.1)