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

# List tools

> The project's tools and the built-in ones, each with its latest version: inputs, description and, for a tool a hosted agent runs, its request. Attach one to an agent draft by id.



## OpenAPI

````yaml /api-reference/openapi.documented.json get /v1/tool
openapi: 3.1.0
info:
  title: Roark Analytics API
  description: >-
    The Roark Analytics API gives you access to the same API that powers the
    award winning Roark Analytics platform.
  version: 1.0.0
servers:
  - description: Production
    url: https://api.roark.ai
security:
  - Bearer: []
tags:
  - name: Agent
  - name: Agent Endpoint
  - name: Tool
  - name: Phone Number
  - name: Call
  - name: Chat
  - name: Metric
  - name: Metric Policy
  - name: Metric Collection Job
  - name: Customer Flow
  - name: Customer Flow Edge Case
  - name: Simulation
  - name: Simulation Persona
  - name: Simulation Environment
  - name: Simulation Scenario
  - name: Simulation Run Plan
  - name: Simulation Template
  - name: Simulation Run Plan Job
  - name: Simulation Job
  - name: HTTP Request Definition
  - name: Webhook
  - name: Issue
  - name: Autoimprove
  - name: Agent Config
  - name: Knowledge Base
  - name: Config
  - name: Organization Project
  - name: Organization Project Member
  - name: Organization Project API Key
  - name: Organization Config
  - name: CLI Auth
  - name: Me
  - name: Project
  - name: Usage
  - name: Analytics
  - name: Dashboard
  - name: Live Report
  - name: Benchmark
  - name: Health
  - name: Prospect Simulation
paths:
  /v1/tool:
    get:
      tags:
        - Tool
      summary: List tools
      description: >-
        The project's tools and the built-in ones, each with its latest version:
        inputs, description and, for a tool a hosted agent runs, its request.
        Attach one to an agent draft by id.
      operationId: getV1Tool
      parameters:
        - in: query
          name: agentId
          schema:
            type: string
            format: uuid
            description: Only tools scoped to this agent
        - in: query
          name: includeBuiltIn
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'true'
            description: Include the built-in tools (default true)
      responses:
        '200':
          description: The tools
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolListResponse'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Authentication error
              example:
                type: authentication
                code: unauthorized
                message: Authentication required
          description: Unauthorized
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Server error
              example:
                type: internal
                code: internal_error
                message: Internal server error
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Roark from '@roarkanalytics/sdk';

            const client = new Roark({
              bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
            });

            const tools = await client.tool.list();

            console.log(tools.data);
        - lang: Python
          source: |-
            import os
            from roark_analytics import Roark

            client = Roark(
                bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"),  # This is the default and can be omitted
            )
            tools = client.tool.list()
            print(tools.data)
components:
  schemas:
    ToolListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ToolResponse'
      required:
        - data
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - validation
            - authentication
            - forbidden
            - not_found
            - conflict
            - payment_required
            - rate_limit
            - internal
          description: The error type category
          examples:
            - validation
            - authentication
        code:
          type: string
          description: Machine-readable error code identifier
          examples:
            - invalid_parameter
            - missing_required_field
            - unauthorized
        message:
          type: string
          description: Human-readable error message
          examples:
            - The request was invalid
            - Authentication required
        param:
          type: string
          description: The parameter that caused the error (if applicable)
          examples:
            - email
            - user_id
        details:
          description: Additional error context information
      required:
        - type
        - code
        - message
    ToolResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: book_appointment
        source:
          type: string
          enum:
            - CUSTOM
            - SYSTEM
          description: SYSTEM for a built-in tool every project can attach
        systemKey:
          type:
            - string
            - 'null'
          description: The stable key of a built-in tool, such as dtmf
        agentId:
          type:
            - string
            - 'null'
          format: uuid
          description: The agent the tool is scoped to; null for the project
        version:
          type:
            - integer
            - 'null'
          description: The latest version; null before any is declared
        description:
          type:
            - string
            - 'null'
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/ToolInput'
        invocationCriteria:
          type:
            - string
            - 'null'
          description: When the agent should call it, for grading
        expectedResult:
          type:
            - string
            - 'null'
          description: How it should handle the result, for grading
        runtime:
          oneOf:
            - $ref: '#/components/schemas/ToolRuntime'
            - type: 'null'
          description: Null for a tool that is only graded
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - name
        - source
        - systemKey
        - agentId
        - version
        - description
        - inputs
        - invocationCriteria
        - expectedResult
        - runtime
        - createdAt
        - updatedAt
    ToolInput:
      type: object
      properties:
        name:
          type: string
          description: The input name, as the agent passes it
          example: date
        type:
          type: string
          enum:
            - string
            - number
            - boolean
          description: string, number or boolean
        description:
          type:
            - string
            - 'null'
          description: What the input is, so the agent fills it in right
          example: ISO date
        required:
          type: boolean
          description: The agent must pass it
      required:
        - name
        - type
        - description
        - required
    ToolRuntime:
      type: object
      properties:
        request:
          $ref: '#/components/schemas/ToolRequest'
        changesData:
          type: boolean
          description: >-
            The tool books, cancels or sends something: its call is not
            abandoned when the caller interrupts, and each request carries an
            Idempotency-Key.
        responseFields:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Dot paths into the JSON response the agent is given. Null gives it
            the whole response.
        messages:
          $ref: '#/components/schemas/ToolMessages'
      required:
        - request
        - changesData
        - responseFields
        - messages
      description: What a hosted agent sends and says when it calls the tool
    ToolRequest:
      type: object
      properties:
        url:
          type: string
          description: >-
            https URL. Placeholders {{args.<input>}} and {{conversation.*}} (id,
            direction, modality, agentNumber, customerNumber, startedAt) may
            appear in the path and query.
          example: https://api.example.com/bookings
        method:
          type: string
          enum:
            - POST
            - PUT
            - PATCH
            - GET
            - DELETE
        headers:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                minLength: 1
                maxLength: 128
                example: X-Api-Version
              value:
                type: string
                maxLength: 1024
                example: '2026-10-01'
            required:
              - name
              - value
        body:
          type:
            - string
            - 'null'
          description: >-
            JSON body template. Null sends the inputs as the body (POST, PUT,
            PATCH) or the query (GET, DELETE).
        timeoutMs:
          type:
            - integer
            - 'null'
          description: How long the agent waits, 1000 to 30000 ms
      required:
        - url
        - method
        - headers
        - body
        - timeoutMs
    ToolMessages:
      type: object
      properties:
        before:
          type:
            - string
            - 'null'
          description: Said as the request goes out
        slow:
          type:
            - string
            - 'null'
          description: Said once if the request is slow
        failure:
          type:
            - string
            - 'null'
          description: Given to the agent to say when the request fails
      required:
        - before
        - slow
        - failure
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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