generate_visual_cards
Validate and render a VisualStoryContent v2 story that you authored into PNG cards. No LLM call: you write the cards from the analysis you already have; Clarifo enforces structure, palettes, chart specs and colours deterministically and drops invalid fields.
Call get_visual_cards_guide ONCE before authoring (skip only when
re-rendering a story you just authored with it); without it stories
routinely get the wrong templateId, no mode or no cover card.
Story format (essentials; the guide has the full spec):
Top level: company, period, industry, palette
(graphite_navy | deep_green | midnight_teal | burgundy | graphite |
bone), language, numberFormat, cards (4-7; first = cover).
Card: headline (required, <= 12 words), category, deck,
lede, source, stat, chart, mode (A | B | C),
templateId, stats (<= 4), segments, extraCharts (<= 2),
quote, annotations (<= 6). Chart types: line, area, bar,
stacked_bar, bar_line_combo, waterfall, donut, world_map, table,
process_steps, radial_gauge and more. Never invent image URLs.
Args:
visual_story_content: The story; must contain a non-empty cards list.
company / period / industry / palette / language: Optional overrides of
the story's own fields.
aspect: "1:1" (default), "4:5", "9:16", "4:3" or
"16:9" (landscape layout); invalid values fall back to "1:1".
Returns:
Normally a JSON summary plus one PNG image per card. Show the returned
images inline as the result; do not redraw them. The summary carries
visuals[] (visual_id, title, placement_hint,
image_index), visual_order, render_url and the validated
story. When the images are not visible to the user (e.g. ChatGPT, or a
collapsed tool panel), share render_url as a link: it opens the same
cards on clarifo.com. Never write placeholder text such as "[Insert
chart here]"; refer to the visuals in the narrative. If render_qa is
present, apply its hint fixes and call again. Without headless
rendering: the same metadata plus artifact_html. On error:
{"error", "failure_kind"}.
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": {
"visual_story_content": "<visual_story_content>"
},
"name": "generate_visual_cards"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aspect | No | ||
| period | No | ||
| company | No | ||
| palette | No | ||
| industry | No | ||
| language | No | ||
| visual_story_content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||