---
title: "Score a tool call"
method: POST
path: "/api/v1/gateway/tool-call"
---

# Score a tool call

`POST /api/v1/gateway/tool-call`

## Request

- Base URL: `https://app.axiorank.com`
- URL: `https://app.axiorank.com/api/v1/gateway/tool-call`
- Auth: HTTP bearer

Inspect an outbound agent tool call, score its risk, apply your policies, and return a decision. Requires the `gateway:write` scope. When a `require_approval` policy fires the decision is `hold` and an `approvalId` is returned. Poll `GET /api/gateway/approvals/{approvalId}` for the resolution.

## Headers

- `Idempotency-Key` string

## Request body

- ToolCallRequest
  - `tool` string, required
  - `arguments` object
  - `phase` 'request' | 'result' | 'prompt' | 'completion'
  - `resultText` string
  - `promptText` string
  - `completionText` string
  - `context` string
  - `costUsd` number
  - `model` string
  - `inputTokens` integer
  - `outputTokens` integer
  - `durationMs` integer
  - `intent` string
  - `taintHandle` string
  - `passport` boolean
  - `source` 'sdk' | 'mcp' | 'coding-agent' | 'browser-agent'
  - `traceId` string, uuid
  - `stepIndex` integer
  - `sessionId` string, uuid
  - `metadata` object
  - `parentStepIndex` integer

## Response `200`

The governance decision.

- ToolCallResponse
  - `decision` 'allow' | 'deny' | 'hold', required
  - `reason` string, required
  - `risk` integer, required
  - `auditLogId` string, required
  - `signals` RiskSignal[], required
    - `detector` string, required
    - `category` 'secret' | 'pii' | 'destructive' | 'injection' | 'egress' | 'bot_spoof' | 'rate_abuse' | 'supply_chain', required
    - `severity` 'low' | 'medium' | 'high' | 'critical', required
    - `label` string, required
    - `points` integer, required: Pre-diminishing-returns contribution, from severity.
    - `location` string, required
    - `evidence` string, required: Redacted evidence, safe to persist and display.
    - `critical` boolean: A live secret / key / card was detected.
  - `approvalId` string: Present ONLY when decision is `hold`. Poll GET /api/gateway/approvals/{id}.
  - `ifc` boolean: True when this workspace enforces information-flow control. The SDK uses it to decide whether to report untrusted tool results (phase="result") for taint tracking.

## Other responses

- `400`: Malformed request body.
- `401`: Missing or invalid API key.
- `402`: Workspace monthly usage quota exceeded.
- `409`: A request with this Idempotency-Key is already in progress.
- `422`: Idempotency-Key was reused with a different request body.
- `429`: Rate limited.

---

[API](https://skmtc.dev/axiorank/apis/axiorank-gateway-api.md) · [All operations](https://skmtc.dev/axiorank/apis/axiorank-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/axiorank/apis/axiorank-gateway-api/revisions/d8a7a33656e4?raw)
