Skip to content

OpenClaw Integration

@slop-ai/openclaw-plugin lets OpenClaw discover SLOP-enabled apps on your machine and act on them through five tools:

  • list_apps
  • connect_app
  • disconnect_app
  • app_action
  • app_action_batch
  • Discovers SLOP apps — local native apps, WebSocket servers, and browser tabs via the extension bridge (powered by @slop-ai/discovery)
  • Injects state into the prompt before each inference via before_prompt_build — the model sees live app state without calling any tool
  • Exposes actions through app_action and app_action_batch meta-tools
  • Supports multiple apps connected simultaneously

From a local checkout:

Terminal window
openclaw plugins install --link /path/to/slop/packages/typescript/integrations/openclaw-plugin

When your OpenClaw setup supports registry installs:

Terminal window
openclaw plugins install @slop-ai/openclaw-plugin

Verify the plugin:

Terminal window
openclaw plugins inspect slop

The plugin registers a before_prompt_build hook that injects connected providers’ state trees as prependContext. On every inference turn, the model sees:

## SLOP Apps
1 app(s) connected. Use app_action or app_action_batch to act on them. Call connect_app to refresh state or disconnect_app when you're done.
### Kanban Board (kanban-app)

[root] kanban-app: Kanban Board [collection] columns (count=3) [item] col-1: Backlog actions: {add_card(title: string)}

### Available (not connected)
- **Chat App** (id: `chat-app`, ws, local)

The model knows what state exists and what actions are available without calling any tool.

ToolPurpose
list_appsList all available apps and show which ones are already connected
connect_appConnect to an app and see its full state tree
disconnect_appDisconnect from an app and stop injecting its state
app_actionPerform a single action: app_action(app, path, action, params)
app_action_batchPerform multiple actions in one call

The plugin uses @slop-ai/discovery for provider discovery, which covers:

  • ~/.slop/providers/ — persistent user-level providers
  • /tmp/slop/providers/ — session-level ephemeral providers
  • Browser extension bridge — web apps announced over ws://127.0.0.1:9339/slop-bridge

All three transport types (Unix socket, WebSocket, postMessage relay) are supported.

# Model sees kanban state in context via before_prompt_build injection
list_apps() # List available apps
connect_app("kanban") # Connect and get full state + actions
app_action("kanban", "/columns/backlog", "add_card", { title: "Ship docs" })
app_action_batch("kanban", [
{ path: "/columns/backlog", action: "add_card", params: { title: "Task 1" } },
{ path: "/columns/backlog", action: "add_card", params: { title: "Task 2" } },
])
disconnect_app("kanban") # Stop tracking the app when you're done

The Claude Code plugin uses dynamic tool injection — when an app connects, its affordances are registered as individual MCP tools (e.g., kanban__add_card), and Claude calls them directly. This is possible because MCP supports notifications/tools/list_changed, allowing the server to add and remove tools at runtime.

OpenClaw’s plugin SDK does not support runtime tool registration. Tools must be:

  1. Declared in the plugin manifest (openclaw.plugin.jsoncontracts.tools)
  2. Registered once during the register() callback via api.registerTool()

There is no api.unregisterTool() or api.updateTools() API. This means the plugin cannot add per-app tools when providers connect or remove them when providers disconnect.

The workaround is the meta-tool pattern: five stable tools (list_apps, connect_app, disconnect_app, app_action, app_action_batch) that resolve actions dynamically at runtime. The model knows the exact paths and action names from the state injection, so it gets the call right on the first try.

What would be needed for dynamic tools in OpenClaw

Section titled “What would be needed for dynamic tools in OpenClaw”

If OpenClaw adds a runtime tool registration API (e.g., api.registerDynamicTools() or api.updateToolList()), the plumbing is already in place:

  • createDynamicTools(discovery) from @slop-ai/discovery generates namespaced tool definitions from all connected providers
  • Each tool maps to { providerId, path, action } via a resolve() function
  • The same helper is already used by the Claude Code MCP server
FeatureClaude CodeOpenClaw
State injectionUserPromptSubmit hook → file-basedbefore_prompt_buildprependContext
Available apps in contextYes (discovered + connected)Yes (discovered + connected)
Action toolsDynamic per-app tools (kanban__add_card)Meta-tools (app_action)
Batch actionsapp_action_batchapp_action_batch
List toollist_appslist_apps
Connect toolconnect_appconnect_app
Disconnect tooldisconnect_appdisconnect_app
Discovery@slop-ai/discovery@slop-ai/discovery
Bridge supportYesYes
Staleness protection30s timestamp checkNot needed (in-process)

The key difference is action dispatch. Claude Code uses MCP’s dynamic tool list to expose affordances as first-class tools. OpenClaw uses stable meta-tools because its plugin SDK requires upfront tool declaration.

Both approaches give the model full context about available state and actions. The meta-tool pattern adds one layer of indirection (app_action call instead of kanban__add_card call) but is otherwise equivalent in capability.