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

# Execute a tool via REST



## OpenAPI

````yaml /openapi.json post /api/v1/tools/{tool}/execute
openapi: 3.1.0
info:
  title: ADSMCP REST API
  version: 0.1.0
  description: REST facade for MCP tool execution.
servers:
  - url: https://adsmcp.si
security: []
paths:
  /api/v1/tools/{tool}/execute:
    post:
      summary: Execute a tool via REST
      operationId: executeTool
      parameters:
        - name: tool
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer token, e.g. `Bearer <token>`.
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: Optional replay-safe key for duplicate execution requests.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteToolRequest'
      responses:
        '200':
          description: Tool execution result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecuteToolResponse'
        '400':
          description: Invalid JSON input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecuteToolResponse'
        '409':
          description: Idempotency key is already being processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ExecuteToolRequest:
      type: object
      properties:
        platform:
          type: string
          default: meta
        arguments:
          type: object
          additionalProperties: true
      additionalProperties: false
    ExecuteToolResponse:
      type: object
      properties:
        ok:
          type: boolean
        platform:
          type: string
        tool:
          type: string
        data: {}
        error:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/ErrorResponse'
        mcp_response: {}
      required:
        - ok
        - platform
        - tool
        - error
        - mcp_response
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        code: {}
        message:
          type: string
        details: {}
      required:
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API token

````

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