Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:A9T9 RPA Tool Execution

From Leeroopedia
Knowledge Sources
Domains AI_Agent, MCP, Tool_Execution
Last Updated 2026-10-22 00:00 GMT

Overview

Mechanism for executing AI-agent tool calls against a browser extension's macro and automation infrastructure, providing a defined set of tools for macro creation, execution, and inspection.

Description

Tool Execution is the backend that processes tool calls from an AI agent (either the built-in AI macro agent or an external MCP client). The `MacroAgentTools` class implements a set of tools with defined schemas (`MACRO_AGENT_TOOLS`) that the AI model can call:

  • Macro management: `get_macro` (read current editor macro), `set_macro` (modify the current macro), `create_macro` (create a new JS script macro)
  • Execution: `run_macro` (execute the current macro and return the log)
  • Inspection: `browser_snapshot` (page accessibility tree with `ref=N` locators or fields list), `get_screenshot` (capture a screenshot)
  • Utility: `list_macros`, `get_logs`, `get_authoring_guide`

Each tool call is dispatched by `executeToolCall(name, data)` to the appropriate handler. The handlers interact with the Redux store (editor state), the player engine, the script runner, and the screenshot service. Results are returned as `ToolResult` objects with content (text/image) and error status.

Usage

Use this principle when designing an AI-agent or MCP-driven automation system that exposes a defined set of tools for macro creation, execution, and inspection.

Theoretical Basis

Tool execution is a dispatch table:

execute(name,args)=handlername(args)→ToolResult

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment