Skip to content

cap_router_mgr

Source: cap_router_mgr.ccomponents/claw_capabilities/cap_router_mgr/src/cap_router_mgr.c · header: cap_router_mgr.hcomponents/claw_capabilities/cap_router_mgr/include/cap_router_mgr.h · Skill: SKILL.mdcomponents/claw_capabilities/cap_router_mgr/skills/cap_router_mgr/SKILL.md

cap_router_mgr exposes a set of tools to the LLM, allowing the Agent to dynamically add, query, update, and delete Event Router automation rules at runtime. Combined with the rule format described in Dataflow and automation, the LLM can create complex event-driven automation from user instructions.

Tool IDDescription
list_router_rulesList all automation rules as a JSON array
get_router_ruleGet one rule by ID
add_router_ruleAdd a new automation rule
update_router_ruleUpdate an existing automation rule
delete_router_ruleDelete one rule by ID
reload_router_rulesReload all rules from disk

No parameters. Returns all rules as a JSON array.

ParameterTypeRequiredDescription
idstringYesRule ID
ParameterTypeRequiredDescription
rule_jsonstringYesComplete rule JSON string
ParameterTypeRequiredDescription
rule_jsonstringYesComplete rule JSON string containing an id field
ParameterTypeRequiredDescription
idstringYesID of the rule to delete

No parameters. Reloads all rules from the disk file.

All tools return JSON-formatted results:

  • Success: {"ok": true, ...}
  • Failure: {"ok": false, "error": "...", "code": "ESP_ERR_*"}

Common errors:

  • add_router_rule returns ESP_ERR_INVALID_STATE when the ID already exists
  • Reaching the rule count limit returns ESP_ERR_INVALID_SIZE
  • Invalid parameter format returns ESP_ERR_INVALID_ARG
PropertyValue
Group IDcap_router_mgr
Default LLM-visibleYes (edge_agent default initial visible group)
Tool count6
Dataflow and automation Event Router rule format and the complete event-driven automation mechanism