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

# Get Tool

> Get a tool by ID.



## OpenAPI

````yaml /openapi.json get /tools/{tool_id}
openapi: 3.1.0
info:
  title: Kejue Public API
  description: >-
    The Kejue Public API lets you programmatically create calls, manage
    campaigns, and retrieve call results.


    ## Authentication


    All requests require an API key passed in the `X-API-Key` header:


    ```

    X-API-Key: kej_live_...

    ```


    API keys are scoped to a workspace. Create and manage keys from the Kejue
    dashboard under **Settings → API Keys**.


    ## Base URL


    ```

    https://api.kejue.co/api/v1

    ```


    ## Rate Limits


    API requests are rate-limited per workspace. If you exceed the limit you'll
    receive a `429 Too Many Requests` response.


    ## Errors


    All error responses follow a consistent format:


    ```json

    {
      "error": "Human-readable message",
      "code": "ERROR_CODE",
      "details": {}
    }

    ```
  version: 1.0.0
servers:
  - url: https://api.kejue.co/api/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: >-
      Create and manage AI agents (personas). Each agent has a name, prompt,
      voice configuration, and optional tools. Agents are the core building
      block — attach voice configs, tools, and use them to make calls.
  - name: Calls
    description: >-
      Create outbound calls, retrieve call details and transcripts, and list
      calls with filtering. Each call is associated with a contact and
      optionally an agent and campaign.
  - name: Persona Calls
    description: >-
      Create calls with the full agent configuration pre-loaded. Applies the
      complete settings hierarchy (workspace → agent → campaign → overrides)
      with all agent tools, tags, scoring, and webhooks inherited automatically.
  - name: Contacts
    description: >-
      Create and manage contacts. Contacts represent the people your agents
      call. Each contact has a phone number, name, and optional metadata.
      Supports single creation, bulk import, and CSV upload.
  - name: Campaigns
    description: >-
      Create and manage calling campaigns. Campaigns let you batch-call a list
      of contacts with shared settings, scheduling, and retry logic.
  - name: Tools
    description: >-
      Create and manage custom HTTP tools that agents can invoke during calls.
      Tools let agents fetch data, trigger actions, or integrate with external
      systems mid-conversation.


      Each tool supports three parameter types:

      - **Dynamic parameters** — filled by the AI at runtime (visible to the AI)

      - **Static parameters** — fixed values sent with every invocation (hidden
      from the AI)

      - **System parameters** — values injected from the execution context at
      runtime, such as `call_id`, `contact_id`, or `workspace_id` (hidden from
      the AI)
  - name: Voices
    description: List available voices for use in agent voice configurations.
  - name: Phone Numbers
    description: List phone numbers available in your workspace for making outbound calls.
  - name: Webhooks
    description: >-
      Create and manage webhook subscriptions. Receive real-time notifications
      for call events (started, ended, etc.) at your specified URL.
  - name: Models
    description: List available AI models for use in agent voice configurations.
paths:
  /tools/{tool_id}:
    get:
      tags:
        - Tools
      summary: Get Tool
      description: Get a tool by ID.
      operationId: get_tool_tools__tool_id__get
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            title: Tool Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolResponse'
        '401':
          description: >-
            Missing or invalid API key. Pass a workspace API key in the
            `X-API-Key` header.
          content:
            application/json:
              example:
                error: Invalid or missing API key
                code: UNAUTHORIZED
                details: {}
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Tool not found in this workspace.
          content:
            application/json:
              example:
                error: Tool not found
                code: NOT_FOUND
                details:
                  tool_id: non_existent_id
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ToolResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        tool_type:
          type: string
          title: Tool Type
        http_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Http Config
        parameters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parameters
        response_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Response Schema
        timeout:
          type: integer
          title: Timeout
        retry_count:
          type: integer
          title: Retry Count
        precomputable:
          type: boolean
          title: Precomputable
          default: false
        agent_reaction:
          $ref: '#/components/schemas/AgentReaction'
          default: speaks
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - name
        - tool_type
        - timeout
        - retry_count
      title: ToolResponse
      description: A custom HTTP tool (public-safe response).
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        code:
          type: string
          title: Code
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - error
        - code
      title: ErrorResponse
      description: Standard error response.
      example:
        code: NOT_FOUND
        details:
          contact_id: '123'
        error: Contact not found
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentReaction:
      type: string
      enum:
        - speaks
        - silent
        - speaks-once
      title: AgentReaction
      description: |-
        How the voice agent reacts when a tool call fires.

        Ultravox-specific. Ignored by chat tool-calling.
        - SPEAKS: agent speaks naturally around the tool call (Ultravox default)
        - SILENT: agent stays silent until the tool returns
        - SPEAKS_ONCE: agent speaks at most one filler line during the tool call
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Workspace API key (e.g. `kej_live_...`)

````