Style a Garphield graph
garphield_styleBind data fields or computed algorithms to visual channels, and set the layout mode, how links show direction (arrows), theme, tooltip templates for nodes and links, drawing values (appearance: link width and opacity, node size, curvature, label placement) and structure (Group by rings, the Backbone, or a merge into one node per field value) of a stored graph. Example binding: {"channel": "edgeWidth", "field": "amount_bn"}; a bare field name resolves to the field on the channel's target (node or edge). Strict and atomic: if any entry is invalid nothing is written and each problem comes back with a path, the expected values and suggestions. Merges by channel unless replace is true. The result echoes every stored binding. preview: true also returns a small image of the styled graph; it adds a render (10-20 s on the hosted server), so ask for it when you mean to look.
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": {
"doc": "<doc>"
},
"name": "garphield_style"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Document reference: a stored document id, a file path, or "current" in the workbench. | |
| theme | No | Default theme for embed links (and the saved view, if the document has one). null clears it; a saved view returns to the light default. | |
| layout | No | Layout the workbench uses on open. Sets config only and computes no positions. | |
| preview | No | true returns a 600x400 image of the saved graph, so you can check it for overlapping nodes, tangles and unreadable labels and fix them. A render can take 10-20 s and counts toward the host's image limit; the change is saved even when no preview can be made. Default false. | |
| replace | No | true replaces every binding with this list; false (default) merges by channel. | |
| bindings | No | ||
| structure | No | How the workbench and embeds draw the graph on open: Group by, Backbone and merge. Each part changes only what is given. A merge draws with neither groups nor the Backbone: turning it on turns them off, and turning either on turns it off. The network and its positions are unchanged. | |
| appearance | No | The Style pane's drawing values, e.g. {"linkWidth": 4, "linkOpacity": 0.7}. Merges with the values already set; null returns them all to the defaults. | |
| edgeDirection | No | How links show their direction in a directed graph: arrow (arrowheads), tapered (each link narrows toward its target, the workbench default), flow (animated) or line (none). | |
| tooltipTemplate | No | Embed tooltip Markdown with {attribute} placeholders, e.g. "### {label}\n{role}". null clears it. | |
| linkTooltipTemplate | No | Embed hover card for links: the same Markdown over link attributes, plus {source} and {target} (the end nodes' labels), e.g. "### {source} to {target}\n{tasks} tasks". A line that is only {@markdown field} renders that attribute's own lists and emphasis. Without it links get no card; null clears it. |