Build a figure
tellagen_build_figureTurn cited numbers from tool results into validated Tellagen figures and widgets, including stats, compare, trend, table, checks, histograms, and diffs, before sending.
Instructions
Turn numbers you already read from a tool result into a figure (a typed widget) that Tellagen draws, and check it against Tellagen's limits before you send it. Widgets: stats (headline numbers: aim for 4, up to 8 with figure_extras_v1, and an optional title), compare (before and after per host, route or job, with an SLO line), trend (a series over time with up to 3 marks), table (a ranked list, up to 12 rows), checks (pass or fail per check, up to 12), changes (a value that moved from one thing to another), range_overlap (2 to 4 ranges that meet), histogram (bucket counts before and after), run_history (CI or deploy runs with the regression and fix marks), diff (the changed lines of a code change), log_lines (the log lines of a Loki result that prove a claim, or the proof that there are none). For a time series send raw samples as points and the deploy, alert or rollback times as events: the tool puts them on an even grid of at most 500 points and works out the mark positions. For a histogram send Prometheus cumulative le buckets as buckets; for a run history send the GitHub Actions run list as github_runs; for a diff send the patch of one file: a change of 12 or fewer changed lines is sent whole with each removed line next to the line that replaced it, a longer one needs select_hunks (at most 3 hunks). Pass run_id so unchanged lines and line numbers are added only when this Tellagen lists diff_lines_v1, a stats title, more than 4 stats and runs_not_shown only when it lists figure_extras_v1, and the limit of a compare row only when it lists figure_limits_v1 (a row with a limit needs no before; never put a limit in before). It has no data of its own and never invents a value, so send only numbers from a tool result you can cite. placement step_figure is for a causal step (any type except table and changes, one per step). placement timeline_block is for a timeline event (any type). Read resource://tellagen/figure-guide to choose the widget and to see how to plot data on it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"placement": "<placement>",
"figure": "<figure>"
},
"name": "tellagen_build_figure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slot | No | timeline_block only: draw the block above the note. Not together with anchor. | |
| anchor | No | timeline_block only: the exact heading text in the note that the block sits under. Not together with slot. | |
| figure | Yes | ||
| run_id | No | The investigation run you are working on. For a diff, a stats, a run_history or a log_lines figure, Tellagen is asked which features it lists in server_capabilities (diff_lines_v1: unchanged lines and line numbers; figure_extras_v1: a stats title, more than 4 stats, runs_not_shown; figure_limits_v1: a limit on a compare row; log_lines_v1: log_lines) and, for log_lines, what the run window is. Without it the latest pickup of this process decides. | |
| placement | Yes | step_figure for result_summary.causal_paths[].steps[].figure. timeline_block for the blocks of a timeline event. | |
| postmortem | No | timeline_block only: false keeps the block out of the postmortem. |