Asboblarni chaqirish (HTTP)
OpenClaw Gateway bitta asbobni to‘g‘ridan-to‘g‘ri chaqirish uchun oddiy HTTP endpoint taqdim etadi. U har doim yoqilgan, biroq Gateway autentifikatsiyasi va asbob siyosati bilan cheklangan.POST /tools/invoke- Gateway bilan bir xil port (WS + HTTP multiplex):
http://<gateway-host>:<port>/tools/invoke
Autentifikatsiya
Gateway autentifikatsiya konfiguratsiyasidan foydalanadi. Bearer token yuboring:Authorization: Bearer <token>
gateway.auth.mode="token"bo‘lsa,gateway.auth.token(yokiOPENCLAW_GATEWAY_TOKEN) dan foydalaning.gateway.auth.mode="password"bo‘lsa,gateway.auth.password(yokiOPENCLAW_GATEWAY_PASSWORD) dan foydalaning.- Agar
gateway.auth.rateLimitsozlangan bo‘lsa va autentifikatsiya xatolari juda ko‘p yuz bersa, endpoint429vaRetry-Afterbilan javob qaytaradi.
11. So‘rov tanasi
tool(string, required): tool name to invoke.action(string, optional): mapped into args if the tool schema supportsactionand the args payload omitted it.args(object, optional): tool-specific arguments.-
sessionKey(string, ixtiyoriy): maqsadli sessiya kaliti. If omitted or"main", the Gateway uses the configured main session key (honorssession.mainKeyand default agent, orglobalin global scope).
dryRun(boolean, optional): reserved for future use; currently ignored.
Policy + routing behavior
- Asboblar mavjudligi Gateway agentlari ishlatadigan xuddi shu siyosat zanjiri orqali filtrlanadi:
tools.profile/tools.byProvider.profiletools.allow/tools.byProvider.allowagents.<id>.tools.allow/agents.<id>.tools.byProvider.allow- group policies (if the session key maps to a group or channel)
- subagent policy (when invoking with a subagent session key)
sessions_spawnsessions_sendgatewaywhatsapp_login
gateway.tools orqali moslashtirishingiz mumkin:
x-openclaw-message-channel: <channel>(example:slack,telegram)x-openclaw-account-id: <accountId>(when multiple accounts exist)
14. Javoblar
200→{ ok: true, result }400→{ ok: false, error: { type, message } }(noto‘g‘ri so‘rov yoki vosita kiritish xatosi)401→ unauthorized429→ autentifikatsiya rate-limit’ga uchradi (Retry-Aftero‘rnatilgan)404→ tool not available (not found or not allowlisted)405→ method not allowed500→{ ok: false, error: { type, message } }(kutilmagan vosita bajarilish xatosi; tozalangan xabar)