Highlight or focus part of a Garphield graph
garphield_focusSave named sets of nodes and focus the view on them; the app, share links, embeds and PNG exports all show the result. A set comes from exactly one of: nodes (ids), edges ([source, target] pairs, kept as their endpoints), path (a shortest path from one node to another), top (the k highest or lowest by a field or algorithm such as degree), or match (a range, values, or one node's value of a field or algorithm, e.g. a louvain community). filters fade (default) or hide everything outside a set ({"set": "path"}) or outside a range or values of a field or algorithm. mark rings a set's nodes. clear empties the filters, or with "all" every set too. Example, highlight a path: {"sets": [{"id": "route", "path": {"from": "a", "to": "e"}}], "filters": [{"set": "route"}]}. Show only the top 20 by degree: {"sets": [{"id": "hubs", "top": {"algorithm": "degree", "k": 20}}], "filters": [{"set": "hubs", "mode": "hide"}]}. Strict and atomic: if anything is invalid nothing is written, and each problem comes back with a path and suggestions (unknown node ids suggest near ids and nodes with that label).
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_focus"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Document reference: a stored document id, a file path, or "current" in the workbench. | |
| mark | No | Ring this set's nodes (the border channel bound to the set). null removes a set ring. | |
| sets | No | ||
| clear | No | Applied first. "filters" empties the filter stack; "all" also deletes every set and every binding that reads one. | |
| filters | No | Merged into the filter stack by id. |