Skip to main content

get_flight_viz_guide

Loads the guide to the Flight Explainer convention: the Mermaid chart a Flight declares and the @flight-run and @flight-log lines it prints, so its runs can be viewed step by step with per-step status and timing. An AI agent calls it first whenever you ask the agent to visualize, chart, watch, or review a Flight's progress.

Description​

get_flight_viz_guide returns the full Flight Explainer guide, or one section of it for a narrow lookup. Your AI agent loads the whole guide when it adds or changes instrumentation, adds fan-out, branches, child Flights, timing, or progress, or interprets a nontrivial run, because those tasks span sections.

The CLI equivalent is motherduck flight guide --explainer.

Input parameters​

ParameterTypeRequiredDescription
sectionstringNoLoad one section only: chart (Mermaid declarations, node kinds and meters, labeled edges, child-Flight nodes), grammar (@flight-run and @flight-log events, fields, effects, JSON mode, status roll-up, branches), emitting (Python print and helper patterns), or examples (a worked Flight). Omit to load the whole guide.

Output​

The tool returns JSON with success and the guide text. A single section ends with a note on what the excerpt leaves out.

Example usage​

Add a Flight Explainer to the orders_nightly Flight without changing what it does.

The AI agent calls get_flight_viz_guide, reads the Flight with get_flight, saves the chart and progress lines with update_flight, and opens the next run with view_flight_run.