Tools
A tool is one question flockmcp can answer. The assistant is given the list of tools, with what each is for and the arguments it takes, and decides which to call. You do not call tools yourself, but knowing them helps you ask for what you want and read what the assistant shows you.
| Area | Tools |
|---|---|
| Fleet | list_daemons, fleet_overview, server_status |
| System | sys_overview, sys_vrfs, sys_interfaces |
| RIB | rib_lookup, rib_walk, lrib |
| Static routes | static_overview, static_routes |
| BGP | bgp_overview, bgp_vrfs, bgp_neighbors, bgp_neighbor, bgp_rib, bgp_adj_rib, bgp_evpn |
| Changing a router | bgp_reset_neighbor |
Naming the router
Every tool that asks a router something takes daemon: the name the router was given with --daemon. list_daemons gives the names.
A tool that looks in one VRF uses the main VRF, default, when vrf is left out. A tool that lists across VRFs lists every VRF's.
Answers
An answer is JSON, and holds the same values flockc --format json prints for the same question. The Flock Networks Routing Suite User Guide describes them.
Looking one thing up
A tool that looks one thing up, such as a route or a neighbor, answers with it. Where the router has no such thing, the answer says so. That is an answer, not a failure:
{
"found": false,
"looked_for": "prefix 9.9.9.0/24 in the RIB of VRF default on daemon r1"
}
Walking a table
A routing table can hold far more than an assistant can read at once, so a tool that walks a table returns a part of it.
{
"entries": [ ... ],
"finished": false,
"next": "10.1.37.0/24"
}
entriesare in order: by prefix for a routing table.finishedis true when there is nothing after them.- While
finishedis false, the same call withstart_fromset to the answer'snextreturns the part after it.
A part holds up to 100 entries unless max_entries asks for another number, which can be up to 1000. A part is also cut at about 64KB, so entries with many paths come fewer to a part. An entry too large for a part on its own is returned alone, with a note saying so.
Walk only what is needed. root limits a walk to the prefixes under one prefix: 10.1.0.0/16 walks that prefix and the more specific prefixes within it. Leaving root out walks every IPv4 prefix, or for a table of one address family every prefix of that family. ::/0 walks every IPv6 prefix.
Arguments that are refused
flockmcp checks a tool's arguments before it asks a router, and says what to give instead:
prefix "10.1.2.3/16" has host bits set: did you mean 10.1.0.0/16?
no daemon named r9: the daemons are r1, r2
The assistant reads the message and normally corrects the call by itself.
Failures
A tool that cannot answer says why, naming the router. The assistant can go on to ask the other routers. See Troubleshooting.