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

# Retrieve a tool



## OpenAPI

````yaml api-reference/openapi.json GET /api/v1/tools/{tool_id}
openapi: 3.0.3
info:
  title: Duckie API
  version: 1.0.0
  description: >-
    Read-only API for exporting Duckie runs, tool catalog data, agents,
    guidelines, guardrails, and runbooks.
servers:
  - url: https://app.useduckie.ai
    description: Duckie app
security:
  - DuckieApiKey: []
tags:
  - name: Runs
    description: Run history, run detail, and run filter helpers.
  - name: Tools
    description: Built-in, app, custom, and MCP tools available to the organization.
  - name: Agents
    description: Agent configuration data.
  - name: Guidelines
    description: Published guidelines.
  - name: Guardrails
    description: Escalation and restriction guardrails.
  - name: Runbooks
    description: Published, non-deleted runbooks.
paths:
  /api/v1/tools/{tool_id}:
    get:
      tags:
        - Tools
      summary: Retrieve a tool
      operationId: getTool
      parameters:
        - $ref: '#/components/parameters/ToolId'
      responses:
        '200':
          description: Tool.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    ToolId:
      name: tool_id
      in: path
      required: true
      description: >-
        Public tool ID. Duckie and app tools use `duckie:<id>` or `app:<id>`;
        custom and MCP tools use `custom:<uuid>` or `mcp:<uuid>`.
      schema:
        type: string
  headers:
    XRateLimitLimit:
      description: Request limit for the active rate-limit bucket.
      schema:
        type: integer
    XRateLimitRemaining:
      description: Requests remaining in the active rate-limit bucket.
      schema:
        type: integer
    XRateLimitReset:
      description: Unix timestamp when the active rate-limit bucket resets.
      schema:
        type: integer
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        minimum: 1
  schemas:
    ToolResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Tool'
    Tool:
      type: object
      required:
        - id
        - object
        - type
        - name
        - description
        - is_write_action
        - requires_approval
        - enabled
        - parameters
        - duckie
        - app
        - custom
        - mcp
        - created_at
        - updated_at
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - tool
        type:
          $ref: '#/components/schemas/ToolType'
        name:
          type: string
        description:
          type: string
        is_write_action:
          type: boolean
        requires_approval:
          type: boolean
        enabled:
          type: boolean
        parameters:
          type: array
          items:
            $ref: '#/components/schemas/ToolParameter'
        duckie:
          $ref: '#/components/schemas/NullableDuckieToolMetadata'
        app:
          $ref: '#/components/schemas/NullableAppToolMetadata'
        custom:
          $ref: '#/components/schemas/NullableCustomToolMetadata'
        mcp:
          $ref: '#/components/schemas/NullableMcpToolMetadata'
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    ToolType:
      type: string
      enum:
        - duckie_tool
        - app_tool
        - custom_tool
        - mcp_tool
    ToolParameter:
      type: object
      required:
        - name
        - type
        - required
        - description
        - has_preset_value
      properties:
        name:
          type: string
        type:
          type: string
        required:
          type: boolean
        description:
          type: string
        has_preset_value:
          type: boolean
          description: >-
            True when the tool parameter has a preset value. The value itself is
            not exposed.
    NullableDuckieToolMetadata:
      type: object
      nullable: true
      properties:
        category:
          type: string
          nullable: true
        availability:
          type: string
          nullable: true
    NullableAppToolMetadata:
      type: object
      nullable: true
      properties:
        integration_id:
          type: string
        integration_name:
          type: string
        connection_mode:
          type: string
          enum:
            - customer
            - system
        connection_status:
          type: string
    NullableCustomToolMetadata:
      type: object
      nullable: true
      properties:
        endpoint:
          type: string
        method:
          type: string
        body_format:
          type: string
        headers:
          type: array
          items:
            type: object
            required:
              - name
              - value
            properties:
              name:
                type: string
              value:
                type: string
        http_timeout_sec:
          type: integer
          nullable: true
        auth:
          type: object
          nullable: true
          additionalProperties: true
    NullableMcpToolMetadata:
      type: object
      nullable: true
      properties:
        server_id:
          type: string
          format: uuid
        server_name:
          type: string
          nullable: true
        mcp_tool_name:
          type: string
        input_schema:
          type: object
          additionalProperties: true
    Error:
      type: object
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
          enum:
            - invalid_request
            - unauthenticated
            - permission_denied
            - not_found
            - rate_limited
            - internal_error
        message:
          type: string
        request_id:
          type: string
        retry_after:
          type: integer
          minimum: 1
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: The request is missing a valid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The API key does not have the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The resource was not found in the API key's organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: A rate limit was exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: The API could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    DuckieApiKey:
      type: http
      scheme: bearer
      description: API key created in Duckie Settings -> API Access.

````