Add a data embed to a draft
add_article_embedAdds a live data embed (a line or bar chart, a period comparison, or headline stats) to one of the signed-in person's draft articles, from their own verified data, and places it in the body after the heading given (or at the end). Returns the figures it shows: quote those exactly in the text around it instead of guessing. Money values are in cents. A draft holds at most 6 embeds. Snapshot (the default) freezes the figures when the article is published; live keeps them current. The article is saved as a draft only: nothing is published. The author reviews it, adds a cover image or data embeds and publishes it in the Shipfolio editor at editUrl. Needs the write scope. Before calling, show the user exactly what will change and wait for them to confirm.
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": {
"articleId": "<articleId>",
"product": "<product>",
"kind": "<kind>",
"metrics": "<metrics>"
},
"name": "add_article_embed"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | With Custom: the last day, yyyy-MM-dd | |
| from | No | With Custom: the first day, yyyy-MM-dd | |
| kind | Yes | Line, Bars, Comparison (first period against the last) or Stat (one headline figure per metric) | |
| live | No | true keeps the figures current after publishing; false (default) freezes them when published | |
| range | No | The range: Last2Weeks, Last4Weeks, Last8Weeks, Last12Weeks, Last3Months, Last6Months, Last12Months, LaunchWeek or Custom | Last3Months |
| caption | No | A caption under the embed, at most 200 characters | |
| metrics | Yes | 1 to 4 metrics, e.g. [{"metric":"Mrr"}] or [{"metric":"CloudCostByProvider","provider":"GoogleCloud"}] | |
| product | Yes | The product to chart: a slug from list_embed_sources | |
| articleId | Yes | The draft article's id | |
| granularity | No | Day, Week or Month buckets | Week |
| afterHeading | No | Place it after the heading with this text, e.g. "What it costs to run"; at the end when left out or not found |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| kind | Yes | ||
| series | Yes | ||
| caption | Yes | ||
| editUrl | Yes | ||
| embedId | Yes | ||
| shortcode | Yes | ||
| granularity | Yes |