Skip to main content
Glama
zafnz
by zafnz

flutter_build_runner

Run code generation for Flutter projects to produce outputs for freezed, json_serializable, and drift. Delete conflicting outputs first to avoid stale generated files.

Instructions

Run build_runner to generate code (freezed, json_serializable, drift, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirYesPath to the Flutter project directory
delete_conflictingNoDelete conflicting outputs before building (usually what you want)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.2.5

TDQS

A3.5/5.0
Behavior2/5

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

There are no annotations, so the description carries the full burden of explaining behavior. It only states that code is generated and does not disclose that build_runner may overwrite or delete existing generated/conflicting files, which is especially relevant given the delete_conflicting parameter defaults to true. No side effects, failure modes, or file-system consequences are mentioned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that immediately states the action and purpose. The parenthetical examples add useful context without any filler or unnecessary repetition.

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

Completeness3/5

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

For a simple two-parameter tool with no output schema, the description is mostly sufficient, but it omits usage guidance and side-effect transparency. An agent would benefit from knowing that this is for regenerating serialization/model code after source changes and that conflicting outputs are deleted by default.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and both parameters have clear descriptions in the schema: project_dir is the Flutter project path and delete_conflicting explains its destructive effect. The main description adds no parameter-specific meaning, but it does not need to because the schema already documents the parameters adequately.

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?

The description uses a specific verb ('Run build_runner') and names the resource and outcome ('generate code'), with concrete examples like freezed, json_serializable, and drift. This clearly distinguishes it from siblings like flutter_build by emphasizing code generation rather than building/running the app.

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?

The description implies the tool is for generating code from annotated model packages, so an agent can infer when it is appropriate. However, it does not explicitly state when to prefer this tool over alternatives, such as using flutter_build for actual app compilation, nor does it mention prerequisites like having build_runner configured as a dev dependency.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zafnz/flutter-dev-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server