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

# Submit a tool for background execution

> Submit a tool for background execution — returns ``202 {run_id}`` at once
and runs the tool through the same seam the sync door uses.

The submitted tool is authorized against the caller with the full tool-edge decision
before anything is recorded, so a fenced/secret target is admin-only here exactly as
at the sync door and the MCP edge.



## OpenAPI

````yaml /openapi.json post /api/tool-runs
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.1.1
servers: []
security: []
paths:
  /api/tool-runs:
    post:
      tags:
        - tool-runs
      summary: Submit a tool for background execution
      description: >-
        Submit a tool for background execution — returns ``202 {run_id}`` at
        once

        and runs the tool through the same seam the sync door uses.


        The submitted tool is authorized against the caller with the full
        tool-edge decision

        before anything is recorded, so a fenced/secret target is admin-only
        here exactly as

        at the sync door and the MCP edge.
      operationId: post_api_tool_runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolRunSubmission'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '503':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ReloadingError'
                  - $ref: '#/components/schemas/Error'
          description: >-
            The server is applying a config reload, or a dependency this route
            needs is temporarily unavailable; retry shortly.
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying; carried by the reloading
                answer.
              schema:
                type: integer
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ToolRunSubmission:
      description: |-
        A background tool-run submission: the ``tool_name`` and its keyword
        ``arguments``. Mirrors the shape ``read_tool_call`` enforces at runtime.
      properties:
        arguments:
          additionalProperties: true
          description: Tool keyword arguments.
          title: Arguments
          type: object
        tool_name:
          description: Registered tool name.
          minLength: 1
          title: Tool Name
          type: string
      required:
        - tool_name
      title: ToolRunSubmission
      type: object
    Error:
      properties:
        error:
          type: string
      required:
        - error
      type: object
    ReloadingError:
      properties:
        error:
          const: reloading — the server is applying a config reload; retry shortly
          type: string
        reloading:
          const: true
          type: boolean
      required:
        - error
        - reloading
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````