Run a tool through Guardian
guardian_invoke_toolRun a registered tool through Guardian's rules so it is allowed, held for human approval, or denied before execution. Enforces policy on every call.
Instructions
Run a tool registered on a Guardian connection, instead of calling it directly. Guardian's rules decide ALLOW, ASK or DENY before anything runs. ALLOW runs the tool at once (it can change the target system) and returns the decision, requestId and execution record. ASK runs nothing and returns a requestId: wait for the person to approve it in Guardian, then call guardian_claim. DENY, or Guardian unreachable (reasonCode SERVICE_UNAVAILABLE), runs nothing; each call is a new request, so after an unknown outcome check guardian_record before calling again.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"toolName": "<toolName>"
},
"name": "guardian_invoke_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| purpose | No | Short plain-language reason for this action, recorded with the request. At most 1,024 characters. | |
| toolName | Yes | Name of the tool as registered on the Guardian connection, for example "send_email". Lowercase letters and digits joined by . _ or -, at most 64 characters. | |
| arguments | No | The tool's own input, as the JSON object the tool takes (at most 16,384 bytes of JSON, UTF-8). Guardian decides on these exact arguments, and an approved call runs with them unchanged. Defaults to {}. | |
| connectionId | No | Id of the Guardian connection the tool is registered on (starts with pcn_), as shown in the Guardian console. Optional when the server sets GUARDIAN_CONNECTION_ID; required otherwise. |