Check flows
check_flowsUse this when the user wants to check flow data before drawing a Sankey diagram, for example "do my flows balance" or "why will this Sankey not draw". Takes flows as from, to and amount (pasted text or a list), up to 200 flows and 100 nodes. Returns the problems found, each with its row (unreadable lines, blank names, zero, negative or ambiguous amounts, flows from a node to itself), loops named as paths, pairs that appear more than once, the column of each node, a balance table of inflow and outflow for middle nodes and totals per column. Does not draw the diagram and does not change the data.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_flows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flows | No | Alternative to flows_text: [{"from":"Salary","to":"Budget","amount":"4000"}]. The amount may be text ("1,250.50") or a number. Up to 200 flows and 100 different nodes. | |
| flows_text | No | Flows pasted as text, one per line: from, to, amount, e.g. "Salary,Budget,4000\nBudget,Rent,1500\nBudget,Savings,800". Comma, tab or semicolon between values; an optional header row is skipped; names with commas go in double quotes. Up to 200 lines. Give this or flows. | |
| decimal_mark | No | Decimal mark of the amounts, "." (1,234.50) or "," (1.234,50). Needed only when an amount such as 1,234 or 1.234 could be read both ways; otherwise it is read from the amounts. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | ||
| cycles | Yes | ||
| balance | Yes | ||
| summary | Yes | ||
| can_draw | Yes | ||
| problems | Yes | ||
| flow_count | Yes | ||
| link_count | Yes | ||
| node_count | Yes | ||
| self_loops | Yes | ||
| column_count | Yes | ||
| decimal_mark | Yes | ||
| column_totals | Yes | ||
| preview_count | No | ||
| problem_count | Yes | ||
| header_skipped | Yes | ||
| duplicates_merged | Yes |