edit_chart
Edit an existing chart. Call get_chart first to see its current spec, then pass tool_calls (surgical edits) and/or mermaid (full source replacement, flowchart/ERD only). A create_* tool call replaces the chart's data wholesale and can switch its type. Valid tool names — flowchart: style_chart, update_node, delete_node, add_node, connect_nodes, delete_edge, organize_sections, add_section, update_section, delete_section, move_node_to_section, set_node_icon ({nodeId, icon} or icon "none" to remove), set_key_step ({nodeId} or "none"); process/funnel/timeline/lifecycle: set_item_icon ({itemId, icon} or icon "none") and set_key_item ({itemId} or "none"), plus icon on add_* calls; any type: set_slide_text ({headline, takeaway}) for the Designed presentation slide and set_walkthrough ({steps:[{id, caption}]}) for the Walkthrough (a flowchart with 2+ sections walks one step per section, using subgraph IDs; otherwise use node or item IDs); chevron: create_chevron_chart, add_step, update_step, delete_step, reorder_steps, set_presentation_steps, style_chevron_chart; funnel: create_funnel_chart, add_funnel_stage, update_funnel_stage, delete_funnel_stage, reorder_funnel_stages, style_funnel_chart; lifecycle: create_lifecycle_chart, add_lifecycle_milestone, update_lifecycle_milestone, delete_lifecycle_milestone, update_lifecycle_phase, style_lifecycle_chart; timeline: create_timeline_chart, add_timeline_event, update_timeline_event, delete_timeline_event, reorder_timeline_events, style_timeline_chart; erd: create_erd_chart, add_erd_entity, update_erd_entity, delete_erd_entity, add_erd_attribute, update_erd_attribute, delete_erd_attribute, add_erd_relationship, update_erd_relationship, delete_erd_relationship, set_erd_direction, style_erd_chart (set_erd_direction takes {direction: "vertical"|"horizontal"}). For chevron Presentation-only selection/order edits, use set_presentation_steps with {stepIds:[up to 6 existing IDs in featured order]} (or null to reset to all); never reorder_steps, delete_step, or rename Full steps to change a Presentation summary. Use organize_sections with {sections:[{sectionId,title,nodeIds}], ungroupedNodeIds?} for a complete multi-section regroup; omitted nodes are placed with their closest connected section. Input shapes otherwise match the get_chart spec data (e.g. add_node takes {nodeId, label, shape?, connectFrom?, connectTo?}; style_chart takes {target: ''|'all', bgColor?, textColor?, borderColor?}).
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": {
"chart_id": "<chart_id>"
},
"name": "edit_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | New title (optional). | |
| mermaid | No | Full replacement mermaid source (flowchart/ERD charts only). | |
| chart_id | Yes | Chart id from create_* / list_charts. | |
| tool_calls | No | Ordered edit operations: [{tool, input}]. |