flutter_docs
Fetch a Flutter, Dart SDK, or pub.dev doc page as clean markdown by class, library, or package identifier. Filter by topic and token limit.
Instructions
Fetch one Flutter / Dart SDK / pub.dev documentation page as clean markdown.
Identifier forms (resolved in this order):
"pub:dio" or "pub:dio:5.4.0" → pub.dev package (description + README)
"dart:async.Future" → Dart SDK class (api.dart.dev)
"material.AppBar" / "widgets.ListView" → Flutter class with explicit library
"ListView" → exact match in the local search index, then a widgets/material fallback, then pub.dev as a last resort
Args: identifier: one of the forms above. topic: optional section filter (e.g. "methods", "properties", "examples", "constructors") — keeps only the matching section plus the class title/description; if no section matches, the full content is returned with a "note" listing the available section headings. max_tokens: rough token budget for the returned markdown (1 token ≈ 4 chars); longer output is cut at a line boundary with a trailing note.
Returns {"type", "identifier", "url", "title", "content", "truncated", "tokens", "source_tokens", "max_tokens", "cached"} — plus "truncation" (what was cut and why) whenever "truncated" is true, and an optional "note" — or {"error", "suggestion"} on failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | ||
| identifier | Yes | ||
| max_tokens | No |