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

# Get a tool

> Read one tool. API tools return their full configuration; other types return the same fields as the list endpoint.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v2/tools/{id}
openapi: 3.1.0
info:
  title: Customer API
  version: 1.0.0-beta
  description: >
    **Beta.** This API is in beta. Contracts can still change while we complete
    it, including

    breaking changes; we announce changes in the release notes and keep them as
    rare as we can.

    Pin your integration to the field names and status codes documented here and
    treat unknown

    fields as optional.


    REST API to create and configure voice agents, add tools, test them with
    evals, read

    conversations, and place AI outbound calls.


    **Authentication.** Voice agents, settings, tools, evals and conversations
    use an API token

    created on the **Keys** page of your dashboard. Each operation lists the
    scope it needs under

    `x-required-scopes`; `<resource>:*` grants every action of a resource.
    Outbound calls use a

    separate outbound API token from the **Outbound Calls** page. Send either
    token as

    `Authorization: Bearer <token>`.


    **Responses.** A single resource is returned as a flat JSON object; a
    collection is wrapped in a plural

    key (`voice_agents`, `tools`, `evals`, `conversations`) next to its paging
    fields. Deleting returns

    `204 No Content`. Everything is addressed by the voice agent's `id`; prompts
    and numbers are internal.


    **Errors.** Authentication failures return `{ "error", "message" }`. Request
    quotas return

    `429` with a `Retry-After` header and `{ "error", "message", "details" }`,
    where `error` is a

    stable machine-readable code. Every API call must finish within 30 seconds;
    longer requests return `503` with

    `mf-core:api-request-timeout`. Validation errors list the problems per
    field; the exact shape is

    shown on each operation.
servers:
  - url: https://app.miyon.ai
security: []
tags:
  - name: Voice Agents
    description: >-
      Create and manage voice agents. Configure them through the voice, prompt
      and knowledge-base settings endpoints.
  - name: Voice Agent Settings
    description: >-
      Read and change a voice agent's voice, prompt and knowledge-base settings.
      A voice agent has one prompt (its instructions, greeting and conversation
      settings). Read the schema of a settings group, then update one
      `key`/`value` pair per request.
  - name: Tools
    description: >-
      Create, configure, enable and execute agent tools. Tools are enabled per
      voice agent with `agent_id`. These endpoints accept scoped API tokens
      only; every error uses the `{ "error", "message", "details" }` envelope
      with a stable `mf-core:tool-*` code.
  - name: Outbound Calls
    description: >-
      Place AI calls and review their outcome. Authenticate with the outbound
      API token from the **Outbound Calls** page.
  - name: Conversations
    description: >-
      List and inspect the conversations of your account, including transcripts
      when your retention settings allow.
  - name: Evals
    description: >-
      Evals are automated test conversations that check how a voice agent
      responds. A scenario contains cases; each case contains the caller's turns
      and what the agent must say or do. Run a scenario to get pass/fail
      results.
paths:
  /api/v2/tools/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: ID of the tool.
    get:
      tags:
        - Tools
      summary: Get a tool
      description: >-
        Read one tool. API tools return their full configuration; other types
        return the same fields as the list endpoint.
      operationId: getTool
      parameters:
        - name: agent_id
          in: query
          required: false
          description: >-
            Compute `is_active` against this voice agent (tools other than API
            tools only).
          schema:
            type: integer
        - name: prompt_id
          in: query
          required: false
          deprecated: true
          description: >-
            Deprecated alias of `agent_id` (the agent's prompt id). Use
            `agent_id`.
          schema:
            type: integer
      responses:
        '200':
          description: The tool.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ExternalApiTool'
                    title: API tool
                  - $ref: '#/components/schemas/Tool'
                    title: Other tool
        '401':
          $ref: '#/components/responses/ToolUnauthorized'
        '403':
          $ref: '#/components/responses/ToolForbidden'
        '404':
          $ref: '#/components/responses/ToolNotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - scopedJwt: []
components:
  schemas:
    ExternalApiTool:
      type: object
      description: Full configuration of an API tool. Secrets are never returned.
      properties:
        id:
          type: integer
          description: ID of the tool.
        name:
          type: string
          description: >-
            Tool name as the agent's model sees it. Equals
            `function_definition.name`.
        description:
          type:
            - string
            - 'null'
          description: >-
            What the tool does. Empty for API tools; the model reads
            `function_definition.description`.
        function_type:
          type: string
          const: external:api
          description: Always `external:api`.
        integration_id:
          type: integer
          description: ID of the integration created for this tool.
        ai_action_id:
          type:
            - integer
            - 'null'
          description: ID of the action record backing this tool.
        external_api:
          type: object
          properties:
            url:
              type:
                - string
                - 'null'
            method:
              type: string
              description: HTTP method, for example `GET` or `POST`.
            headers:
              type: object
              additionalProperties:
                type: string
              description: >-
                Request headers. `{{param}}` placeholders are filled from the
                call arguments; `{{api_key}}` resolves to the stored access
                token or OAuth token.
            fixed_parameters:
              type: object
              additionalProperties: true
              description: Values always sent with the request, not chosen by the agent.
            access_token_set:
              type: boolean
              description: True when an access token is stored for this tool.
            oauth_provider_id:
              type:
                - integer
                - 'null'
              description: ID of the OAuth connection used for authentication, if any.
            say_before:
              type: string
              description: Phrase the agent says before calling the API.
            condition:
              type: string
              description: When the agent should use this tool.
            response_fields:
              type: array
              items:
                type: string
              description: Fields of the API response the agent may use.
            response_variables:
              type: array
              items:
                $ref: '#/components/schemas/ResponseVariable'
              description: >-
                Values extracted from the response and stored as variables for
                later steps.
          required:
            - url
            - method
            - headers
            - fixed_parameters
            - access_token_set
            - oauth_provider_id
            - say_before
            - condition
            - response_fields
            - response_variables
          description: How the API is called.
        function_definition:
          type: object
          additionalProperties: true
          description: >-
            OpenAI-style function schema the agent's model uses to decide when
            and how to call the tool.
        enabled_for_agent:
          type: boolean
          description: >-
            Only returned by create. True when `agent_id` was supplied and the
            tool was enabled for that agent.
      required:
        - id
        - name
        - description
        - function_type
        - integration_id
        - ai_action_id
        - external_api
        - function_definition
    Tool:
      type: object
      description: >-
        A tool as returned by the list endpoint, and by the get endpoint for
        tools other than API tools.
      properties:
        id:
          type: integer
          description: ID of the tool.
        name:
          type: string
          description: Tool name as the agent's model sees it.
        display_name:
          type: string
          description: Name shown in the dashboard.
        description:
          type:
            - string
            - 'null'
          description: What the tool does, as the agent's model sees it.
        schema:
          type:
            - string
            - 'null'
          description: The function-calling schema as a raw JSON string.
        is_system_function:
          type: boolean
          description: True for built-in tools.
        is_active:
          type: boolean
          description: >-
            Enabled for the agent given by `agent_id`. Always false when no
            `agent_id` was passed.
        type:
          type:
            - string
            - 'null'
          description: Localized integration label.
        integration_type:
          type:
            - integer
            - 'null'
          description: >-
            Numeric type of the connected integration, when the tool is
            provider-backed.
        integration_id:
          type:
            - integer
            - 'null'
          description: ID of the connected integration, when the tool is provider-backed.
        integration_name:
          type:
            - string
            - 'null'
          description: Name of the connected integration, when the tool is provider-backed.
        created_at:
          type: string
          format: date-time
          description: When the tool was created.
        updated_at:
          type: string
          format: date-time
          description: When the tool was last changed.
        is_forward_call_pair:
          type: boolean
          description: >-
            True for call-forwarding tools, which consist of a check tool and an
            execute tool.
        is_warm_transfer_pair:
          type: boolean
          description: >-
            True for warm-transfer tools, which consist of a check tool and an
            execute tool.
        function_type:
          type:
            - string
            - 'null'
          description: >-
            Tool type, for example `external:api` or `system:end_call`. See `GET
            /api/v2/tools/types`. Null only for tools created before types were
            recorded.
        check_function_id:
          type: integer
          description: >-
            Only on call-forwarding and warm-transfer tools: ID of the check
            tool.
        execute_function_id:
          type:
            - integer
            - 'null'
          description: >-
            Only on call-forwarding and warm-transfer tools: ID of the execute
            tool.
        params:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: Type-specific configuration. Omitted when the tool has none.
      required:
        - id
        - name
        - display_name
        - description
        - schema
        - is_system_function
        - is_active
        - type
        - integration_type
        - integration_id
        - integration_name
        - created_at
        - updated_at
        - is_forward_call_pair
        - is_warm_transfer_pair
        - function_type
    ResponseVariable:
      type: object
      properties:
        key:
          type: string
          pattern: ^[a-z][a-z0-9_]*$
          description: Variable name, lower snake_case.
        path:
          type: string
          description: Path to the value in the response, for example `data.customer.name`.
        default_value:
          type: string
          description: Used when the path is missing.
      required:
        - key
        - path
      description: One value extracted from the API response.
    ApiError:
      type: object
      description: >-
        Error format with a stable machine-readable `error` code, a
        human-readable `message` and request-specific `details`.
      properties:
        error:
          type: string
          description: >-
            Stable machine-readable error code, for example
            `mf-core:rate-limit-exceeded`.
        message:
          type: string
          description: Human-readable explanation.
        details:
          type: object
          additionalProperties: true
          description: >-
            Request-specific data, for example the offending parameter or the
            quota policy.
      required:
        - error
        - message
        - details
  responses:
    ToolUnauthorized:
      description: >-
        The request did not carry a valid scoped API token. Browser sessions and
        legacy API keys are rejected on the Tools endpoints.
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            missing:
              value:
                error: mf-core:tool-authentication-failed
                message: Missing authorization token
                details: {}
            expired:
              value:
                error: mf-core:tool-authentication-failed
                message: Token expired
                details: {}
            invalid:
              value:
                error: mf-core:tool-authentication-failed
                message: Invalid authorization token
                details: {}
    ToolForbidden:
      description: >-
        The token lacks the required scope (`details.scope` names it), the
        tool's integration is not enabled for your account, or your plan does
        not include the tool type.
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            scope:
              value:
                error: mf-core:tool-scope-required
                message: Required tool scope is missing
                details:
                  scope: tools:write
            feature:
              value:
                error: mf-core:tool-feature-disabled
                message: This tool integration is not enabled
                details: {}
            warmTransfer:
              value:
                error: mf-core:tool-warm-transfer-unavailable
                message: Warm transfer is unavailable
                details: {}
            plan:
              value:
                error: mf-core:plan-warm-transfer-not-entitled
                message: Your plan does not include warm transfer
                details: {}
    ToolNotFound:
      description: Tool, voice agent or integration not found in your account.
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            tool:
              value:
                error: mf-core:tool-not-found
                message: Tool not found
                details: {}
            prompt:
              value:
                error: mf-core:tool-prompt-not-found
                message: Prompt not found
                details: {}
            integration:
              value:
                error: mf-core:tool-integration-not-found
                message: Integration not found
                details: {}
            agent:
              value:
                error: mf-core:tool-agent-not-found
                message: Voice agent not found
                details: {}
    RateLimited:
      description: >-
        Too many requests. Wait the number of seconds given in `Retry-After`
        before retrying.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            error: mf-core:rate-limit-exceeded
            message: Rate limit exceeded
            details:
              policy: api_write
              retry_after: 3
    ServiceUnavailable:
      description: >-
        The request was not completed. Either it exceeded the 30-second request
        time limit that applies to every API call (narrow the request and
        retry), or rate limiting is temporarily unavailable. Retry shortly.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            timeout:
              value:
                error: mf-core:api-request-timeout
                message: The API request exceeded the 30-second time limit
                details: {}
            limiter:
              value:
                error: mf-core:rate-limiter-unavailable
                message: API rate limiting is temporarily unavailable
                details:
                  policy: api_write
  securitySchemes:
    scopedJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Scoped API token. Required scopes are listed on each operation in
        x-required-scopes.

````

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