> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blindsight.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Check an agent tool call before running it

> Evaluates the tool name and arguments against the workspace and App
tool policy and masks personal data in the arguments. Part of the
agentic guardrails module; a workspace without it gets `404`.

Requires the `runtime:scan` permission. Rate limit: 200 requests per
second per API key.




## OpenAPI

````yaml /api-reference/openapi-runtime-security.yaml post /api/runtime-security/scan/tool-call
openapi: 3.1.0
info:
  title: Blindsight Runtime Security API
  version: 1.0.0
  summary: 'LLM firewall: prompt-injection, PII, and agent tool-call protection.'
  description: >
    Drop-in firewall for LLM traffic. Three integration modes:

      * **Scan API**, explicit `/scan/input` and `/scan/output` calls.
      * **Reverse proxy**, wire-compatible with the OpenAI, Anthropic, Gemini,
        Vertex and Bedrock APIs; swap the SDK's `base_url` to enable scanning
        at the network boundary.
      * **Tool-call scan**, a check of agent tool arguments before execution.

    **Authentication.** Send a Blindsight API key in the `X-API-Key` header.

    Each key carries permissions, and an endpoint needs one of them:


    | Permission | Value | Endpoints |

    | --- | --- | --- |

    | Scan prompts and responses | `runtime:scan` | `/scan/*` and `/proxy/*` |

    | Read threat events | `runtime:events:read` | `/events`,
    `/events/{uuid}/explain`, `/analytics`, `/drift`, `/health`,
    `/service-status` and the other read endpoints |

    | Read firewall configuration | `runtime:config:read` | `GET /config` |

    | Write firewall configuration | `runtime:config:write` | `PUT /config` |


    `runtime:*` (Full Runtime Access) and full platform access cover all of

    them. A key acts as the person who created it and can never do more than

    that person can.


    All timestamps are UTC, ISO 8601, ending in `Z`, unless an endpoint says

    otherwise.


    See the Runtime Security guides for prose docs, SDK examples, and a

    walk-through of verdicts and configuration.
  contact:
    name: Blindsight Support
    url: https://blindsight.example.com/support
  license:
    name: Proprietary
servers:
  - url: https://platform.blindsight.io
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Scan
    description: Single-call scan endpoints for input, output, batch, and tool calls.
  - name: Proxy
    description: >-
      Wire-compatible reverse-proxy endpoints for OpenAI, Anthropic, Gemini,
      Vertex and Bedrock.
  - name: Configuration
    description: Workspace-scoped firewall settings.
  - name: Analytics
    description: Read-only analytics, event log, and drift endpoints.
  - name: Health
    description: Firewall readiness and service status.
paths:
  /api/runtime-security/scan/tool-call:
    post:
      tags:
        - Scan
      summary: Check an agent tool call before running it
      description: |
        Evaluates the tool name and arguments against the workspace and App
        tool policy and masks personal data in the arguments. Part of the
        agentic guardrails module; a workspace without it gets `404`.

        Requires the `runtime:scan` permission. Rate limit: 200 requests per
        second per API key.
      operationId: scanToolCall
      parameters:
        - $ref: '#/components/parameters/AppId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanToolCallRequest'
            example:
              tool_name: send_email
              arguments:
                to: jane.doe@example.com
                body: Hello
      responses:
        '200':
          description: Verdict and reasons
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanToolCallResponse'
              example:
                uuid: e4a9c2b7-1f60-4d83-8a35-6b7c0d2e9f18
                verdict: redact
                reasons: []
                redacted_arguments:
                  to: <EMAIL>
                  body: Hello
                pii:
                  count: 1
                  categories:
                    - email
                arg_bytes: 52
                latency_ms: 3
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/QuotaExceeded'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotEnabled'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    AppId:
      name: X-Blindsight-App-Id
      in: header
      required: false
      schema:
        type: string
      description: |
        UUID of the App the traffic belongs to. Optional: a key limited to one
        App, or a workspace with exactly one App, uses that App. A key limited
        to several Apps must send it.
  schemas:
    ScanToolCallRequest:
      type: object
      required:
        - tool_name
      properties:
        tool_name:
          type: string
          maxLength: 200
        arguments:
          description: 'Tool arguments: any JSON value. Defaults to an empty object.'
        session_id:
          type: string
          maxLength: 200
        source_app:
          type: string
          maxLength: 128
        provider:
          type: string
          maxLength: 32
        model:
          type: string
          maxLength: 128
        metadata:
          type: object
          additionalProperties: true
    ScanToolCallResponse:
      type: object
      required:
        - uuid
        - verdict
        - reasons
        - redacted_arguments
        - pii
        - arg_bytes
        - latency_ms
      properties:
        uuid:
          type: string
          description: Event identifier. Empty when event logging is off.
        verdict:
          type: string
          enum:
            - allow
            - redact
            - block
        reasons:
          type: array
          description: The rules that applied.
          items:
            type: object
            properties:
              code:
                type: string
                description: |
                  For example `tool.denied` (the tool is on the deny list),
                  `tool.not_allowed` (an allow list exists and the tool is not
                  on it) or `tool.args_too_large` (the arguments exceed the
                  size limit).
              severity:
                type: string
              detail:
                type: string
        redacted_arguments:
          description: The arguments with personal data masked.
        pii:
          type: object
          properties:
            count:
              type: integer
            categories:
              type: array
              items:
                type: string
        arg_bytes:
          type: integer
          description: Size of the JSON-serialised arguments in bytes.
        latency_ms:
          type: integer
  responses:
    Unauthorized:
      description: The API key is missing, invalid, expired or disabled
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
    QuotaExceeded:
      description: The workspace has used its request allowance for the current period
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - QUOTA_EXCEEDED
                  message:
                    type: string
                  resets_at:
                    type: string
                  upgrade_url:
                    type: string
    Forbidden:
      description: >-
        The key does not have the permission this endpoint needs, or its owner
        no longer holds it
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
    NotEnabled:
      description: >-
        Runtime Security (or the module this endpoint belongs to) is not enabled
        for the workspace
    ValidationError:
      description: Request body failed schema validation
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: array
                items:
                  type: object
                  properties:
                    loc:
                      type: array
                      items:
                        type: string
                    msg:
                      type: string
                    type:
                      type: string
    RateLimited:
      description: Rate limit reached for this API key
    Unavailable:
      description: The firewall is disabled or still starting
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        Blindsight API key (`ak_...`). The permissions it needs are listed in
        the API description and on each operation: `runtime:scan` for scan and
        proxy routes, `runtime:events:read` for events, analytics, drift,
        health and service status, `runtime:config:read` to read the
        configuration and `runtime:config:write` to change it.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.