Skip to main content
POST
/
action
/
openclaw_tools_invoke
OpenClaw Tools Invoke
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/openclaw_tools_invoke \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "instance_ip": "<string>",
  "auth_token": "<string>",
  "tool": "<string>",
  "output_variable_name": "tool_result",
  "action": "<string>",
  "args_json": "<string>",
  "session_key": "main",
  "dry_run": false,
  "message_channel": "<string>",
  "account_id": "<string>",
  "timeout": "60"
}
'
{
  "status": 123,
  "response": {}
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
instance_ip
string
required

IP address or hostname of the OpenClaw instance (e.g., 167.71.242.214). Do not include https:// prefix.

auth_token
string
required

Bearer token for authenticating with the OpenClaw Gateway.

tool
string
required

Name of the tool to invoke (e.g., sessions_list, web_search). Must be allowed by the Gateway's tool policy.

output_variable_name
string
default:tool_result
required

Variable name for the result. Access tool output with {{tool_result.result}}. Check {{tool_result.ok}} for success.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
action
string

Optional action parameter. Mapped into args if the tool schema supports an 'action' field (e.g., 'json', 'text').

args_json
string

Optional JSON object of tool-specific arguments. Example: {"query": "OpenClaw docs", "limit": 5}

session_key
string
default:main

Target session key. Defaults to 'main'. Controls which agent session the tool runs in.

dry_run
boolean
default:false

Reserved for future use. Currently ignored by the API.

message_channel
string

Optional channel hint for group policy resolution (e.g., 'slack', 'telegram').

account_id
string

Optional account ID for multi-account setups.

timeout
string
default:60

Request timeout in seconds. Default: 60.

Response

Successful response

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action