> ## 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.

# Scan Tool Endpoint

> The live MCP tool verification gate.

Runs the full MCP defense against a tool at discovery / call time:
description scan (with the IOC phrase pack), DB-backed integrity verify
(rug-pull / schema poisoning via trust-on-first-use), cross-server
shadowing, optional tool-result injection scan, and optional dataflow. The
app's ``mcp.enforcement`` mode folds the findings into an allow/flag/block
verdict. Unlike ``register_mcp_tool`` (a one-time admin scan), this is meant
to run on every tool the agent is about to trust.



## OpenAPI

````yaml /api-reference/openapi.json post /api/runtime-security/scan/tool
openapi: 3.1.0
info:
  title: Blindsight API
  version: 0.1.0
  description: >-
    The full Blindsight REST surface, generated from the running application.
    Replace the server host with your own deployment.


    For the Runtime Security integration surface (scan, proxy, tool calls) see
    the Runtime Security spec, which is hand written and carries worked
    examples.
servers:
  - url: https://api.your-blindsight.com
    description: Your Blindsight deployment
security: []
paths:
  /api/runtime-security/scan/tool:
    post:
      tags:
        - runtime-security
      summary: Scan Tool Endpoint
      description: >-
        The live MCP tool verification gate.


        Runs the full MCP defense against a tool at discovery / call time:

        description scan (with the IOC phrase pack), DB-backed integrity verify

        (rug-pull / schema poisoning via trust-on-first-use), cross-server

        shadowing, optional tool-result injection scan, and optional dataflow.
        The

        app's ``mcp.enforcement`` mode folds the findings into an
        allow/flag/block

        verdict. Unlike ``register_mcp_tool`` (a one-time admin scan), this is
        meant

        to run on every tool the agent is about to trust.
      operationId: scan_tool_endpoint_api_runtime_security_scan_tool_post
      parameters:
        - name: X-Blindsight-App-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Blindsight-App-Id
        - name: X-Blindsight-App-Token
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Blindsight-App-Token
        - name: X-Blindsight-Component-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Blindsight-Component-Id
        - name: X-Blindsight-Workload-Platform
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Blindsight-Workload-Platform
        - name: X-Blindsight-Activity-Type
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Blindsight-Activity-Type
        - name: X-Blindsight-Device-Token
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Blindsight-Device-Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanToolRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanToolResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ScanToolRequest:
      properties:
        server:
          type: string
          maxLength: 200
          title: Server
          description: MCP server label the tool belongs to.
        name:
          type: string
          maxLength: 200
          title: Name
          description: Tool name.
        description:
          type: string
          maxLength: 8192
          title: Description
          description: The tool's advertised description.
          default: ''
        schema:
          anyOf:
            - {}
            - type: 'null'
          title: Schema
          description: The tool's JSON input schema (for schema-poisoning detection).
        tool_result:
          anyOf:
            - type: string
              maxLength: 100000
            - type: 'null'
          title: Tool Result
          description: A result the tool returned, to scan for injected content.
        session_labels:
          items:
            type: string
          type: array
          maxItems: 64
          title: Session Labels
          description: Data labels active in this session (dataflow checks).
        source_app:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Source App
        provider:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Provider
        model:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Model
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        playground:
          type: boolean
          title: Playground
          default: false
      type: object
      required:
        - server
        - name
      title: ScanToolRequest
    ScanToolResponse:
      properties:
        uuid:
          type: string
          title: Uuid
        verdict:
          type: string
          title: Verdict
        reasons:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Reasons
        registry:
          additionalProperties: true
          type: object
          title: Registry
        shadowing:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Shadowing
        description_scan:
          additionalProperties: true
          type: object
          title: Description Scan
        result_scan:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result Scan
        dataflow:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Dataflow
        max_severity:
          type: number
          title: Max Severity
        blocked_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Blocked Reason
        latency_ms:
          type: integer
          title: Latency Ms
      type: object
      required:
        - uuid
        - verdict
        - reasons
        - registry
        - description_scan
        - max_severity
        - latency_ms
      title: ScanToolResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````