mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 15:01:41 +03:00
chore: Run pnpm format:fix.
This commit is contained in:
@@ -4,6 +4,7 @@ read_when:
|
||||
- Calling tools without running a full agent turn
|
||||
- Building automations that need tool policy enforcement
|
||||
---
|
||||
|
||||
# Tools Invoke (HTTP)
|
||||
|
||||
OpenClaw’s Gateway exposes a simple HTTP endpoint for invoking a single tool directly. It is always enabled, but gated by Gateway auth and tool policy.
|
||||
@@ -20,6 +21,7 @@ Uses the Gateway auth configuration. Send a bearer token:
|
||||
- `Authorization: Bearer <token>`
|
||||
|
||||
Notes:
|
||||
|
||||
- When `gateway.auth.mode="token"`, use `gateway.auth.token` (or `OPENCLAW_GATEWAY_TOKEN`).
|
||||
- When `gateway.auth.mode="password"`, use `gateway.auth.password` (or `OPENCLAW_GATEWAY_PASSWORD`).
|
||||
|
||||
@@ -36,6 +38,7 @@ Notes:
|
||||
```
|
||||
|
||||
Fields:
|
||||
|
||||
- `tool` (string, required): tool name to invoke.
|
||||
- `action` (string, optional): mapped into args if the tool schema supports `action` and the args payload omitted it.
|
||||
- `args` (object, optional): tool-specific arguments.
|
||||
@@ -45,6 +48,7 @@ Fields:
|
||||
## Policy + routing behavior
|
||||
|
||||
Tool availability is filtered through the same policy chain used by Gateway agents:
|
||||
|
||||
- `tools.profile` / `tools.byProvider.profile`
|
||||
- `tools.allow` / `tools.byProvider.allow`
|
||||
- `agents.<id>.tools.allow` / `agents.<id>.tools.byProvider.allow`
|
||||
@@ -54,6 +58,7 @@ Tool availability is filtered through the same policy chain used by Gateway agen
|
||||
If a tool is not allowed by policy, the endpoint returns **404**.
|
||||
|
||||
To help group policies resolve context, you can optionally set:
|
||||
|
||||
- `x-openclaw-message-channel: <channel>` (example: `slack`, `telegram`)
|
||||
- `x-openclaw-account-id: <accountId>` (when multiple accounts exist)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user