Tools in MCP
The tools the fossui MCP server exposes, what each returns, and when an assistant reaches for it.
The MCP server exposes seven read-only tools over one
endpoint. Each is a slice of the generated manifest, so the values match the
published package. A typical flow is list_components, then get_component for
the one you want, then get_setup once to wire the theme.
list_components
Lists every component with its category, one-line summary, and search tags. No input. The place to start: it gives an assistant the full catalog to pick from.
get_component
The full API for one component: constructors, params, enums, companions,
launcher functions (showFoss...), examples, urls, and the curated whenToUse,
conventions, and commonMistakes.
- Input:
name, for exampleFossButton. - A companion, enum, or launcher name (
FossRadioGroup,FossButtonVariant,showFossDialog) routes to its owning component, so a lookup never dead-ends. - A near miss returns
didYouMeansuggestions instead of the whole catalog.
search
Keyword search across component names, summaries, tags, and whenToUse, the
companion, enum, and launcher names they own, plus token family names. Returns
ranked matches.
- Input:
query. - Companions route to their owner, so
radiogroupsurfacesFossRadioGroupunderFossRadioinstead of missing. - Token families match on intent too:
radiusfinds radii,fontfinds typography.
get_theme_tokens
The theme token families read through context.fossTheme: colors, radii,
spacing, typography, shadows, and motion, each with the concrete values, the
Dart type it resolves to, and the unit those values carry.
- Input:
family(optional). Omit it to get all six. - Input:
token(optional), for one value, for examplefamily: 'radii',token: 'md'. Returns its type, unit, and value; a color role resolves to both light and dark. Requiresfamily. - See Theming for how these are read in code.
get_package
Package identity for pulling fossui into a project: name, version, pub.dev url,
homepage, the install command, the pubspec dependency line, and the import. No
input. Call it to add the package, then get_setup for the wiring.
get_setup
The once-per-project wiring: add the dependency and register the theme.
- Input:
app_type(optional), one ofmaterial,cupertino, orwidgets. - Material apps register a theme extension; Cupertino and bare WidgetsApp use the
FossThemewrapper.
build_custom_component
How to build your own widget that matches fossui: the context.fossTheme access
pattern, the customization layers, and a worked token-only example. No input.
Pair it with get_theme_tokens for the concrete values. See
Theming for the same recipe in context.
Resource
Alongside the tools, the server offers fossui://llms.txt, a flat text overview
of the whole library for clients that would rather read one file than make tool
calls.