Tools Invoke (HTTP)
OpenClaw Gateway는 single tool을 직접 호출할 수 있는 간단한 HTTP endpoint를 제공합니다. 이 기능은 항상 활성화되어 있지만, Gateway auth와 tool policy로 보호됩니다.POST /tools/invoke- Gateway와 같은 포트(WS + HTTP multiplex):
http://<gateway-host>:<port>/tools/invoke
Authentication
Gateway auth configuration을 사용합니다. bearer token을 보내세요.Authorization: Bearer <token>
gateway.auth.mode="token"이면gateway.auth.token(또는OPENCLAW_GATEWAY_TOKEN)을 사용합니다.gateway.auth.mode="password"이면gateway.auth.password(또는OPENCLAW_GATEWAY_PASSWORD)를 사용합니다.gateway.auth.rateLimit이 설정되어 있고 auth failures가 너무 많으면429와Retry-After를 반환합니다.
Request body
tool(string, required): 호출할 tool nameaction(string, optional): tool schema가action을 지원하고 args가 이를 생략한 경우 args에 매핑args(object, optional): tool-specific argumentssessionKey(string, optional): target session key. 생략하거나"main"이면 configured main session key를 사용합니다 (session.mainKey, default agent, 또는 global scope의global)dryRun(boolean, optional): future use reserved field이며 현재는 무시됩니다.
Policy + routing behavior
tool availability는 Gateway agents와 같은 policy chain을 통과합니다.tools.profile/tools.byProvider.profiletools.allow/tools.byProvider.allowagents.<id>.tools.allow/agents.<id>.tools.byProvider.allow- group policies (session key가 group 또는 channel에 매핑될 때)
- subagent policy (subagent session key를 사용할 때)
sessions_spawnsessions_sendgatewaywhatsapp_login
gateway.tools로 조정할 수 있습니다.
x-openclaw-message-channel: <channel>(예:slack,telegram)x-openclaw-account-id: <accountId>(다중 accounts가 있을 때)
Responses
200→{ ok: true, result }400→{ ok: false, error: { type, message } }(잘못된 request 또는 tool input error)401→ unauthorized429→ auth rate-limited (Retry-After포함)404→ tool not available (not found 또는 not allowlisted)405→ method not allowed500→{ ok: false, error: { type, message } }(unexpected tool execution error; sanitized message)