> ## 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: Health
    x-displayName: Health
  - name: Authentication
    x-displayName: Current credential
  - name: Project API Key
    x-displayName: Project API keys
  - name: Personal API Key
    x-displayName: Personal API keys
  - name: Agent
    x-displayName: Agents
  - name: Agent Endpoint
    x-displayName: Endpoints
  - name: Tool
    x-displayName: Tools
  - name: Autoimprove
    x-displayName: Autoimprove
  - name: Generate Simulation Resources
    x-displayName: Generate resources
  - name: Customer Flow
    x-displayName: Customer flows
  - name: Customer Flow Folder
    x-displayName: Customer flow folders
  - name: Simulation Persona
    x-displayName: Personas
  - name: Simulation Environment
    x-displayName: Environments
  - name: Simulation Template
    x-displayName: Templates
  - name: Simulation Run Plan
    x-displayName: Plans
  - name: Simulation Run
    x-displayName: Runs
  - name: Simulation Tool Mock
    x-displayName: Tool mocks and fixtures
  - name: Simulation Phone Number
    x-displayName: Simulation phone numbers
  - name: Metric
    x-displayName: Definitions
  - name: Metric Variant
    x-displayName: Variants
  - name: Metric Policy
    x-displayName: Policies
  - name: Metric Collection Job
    x-displayName: Collection jobs
  - name: Call
    x-displayName: Calls
  - name: Chat
    x-displayName: Chats
  - name: Customer
    x-displayName: Customers
  - name: Issue
    x-displayName: Issues
  - name: Analytics
    x-displayName: Analytics
  - name: Dashboard
    x-displayName: Dashboards & widgets
  - name: Live Report
    x-displayName: Live reports
  - name: Agent Connection
    x-displayName: Agent platforms
  - name: Calendar Connection
    x-displayName: Calendars
  - name: MCP Server Connection
    x-displayName: MCP servers
  - name: Knowledge Base
    x-displayName: Knowledge bases
  - name: HTTP Request Definition
    x-displayName: HTTP request definitions
  - name: Webhook
    x-displayName: Webhooks
  - name: Config
    x-displayName: Config as code
  - name: Organization Project
    x-displayName: Projects
  - name: Organization Project Member
    x-displayName: Project members
  - name: Usage
    x-displayName: Usage
  - name: Benchmark
    x-displayName: Model benchmarks
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
        calendar:
          oneOf:
            - $ref: '#/components/schemas/ToolCalendar'
            - type: 'null'
          description: Null for every tool that is not a calendar tool
        mcp:
          oneOf:
            - $ref: '#/components/schemas/ToolMcp'
            - type: 'null'
          description: Null for every tool that is not an MCP tool
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - name
        - source
        - systemKey
        - agentId
        - version
        - description
        - inputs
        - invocationCriteria
        - expectedResult
        - runtime
        - calendar
        - mcp
        - 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
    ToolCalendar:
      type: object
      properties:
        calendarConnectionId:
          type: string
          format: uuid
          description: The connected calendar the tool books on
        operation:
          type: string
          enum:
            - CHECK_AVAILABILITY
            - BOOK
            - LOOKUP_BOOKING
            - RESCHEDULE
            - CANCEL
            - LIST_BOOKINGS
          description: The one action this tool takes on the calendar
        appointmentTypes:
          type: array
          items:
            $ref: '#/components/schemas/ToolCalendarAppointmentType'
          description: The kinds of appointment the tool may reach
        simulate:
          type: boolean
          description: Every call books on a simulated calendar instead of the customer's
        messages:
          $ref: '#/components/schemas/ToolMessages'
      required:
        - calendarConnectionId
        - operation
        - appointmentTypes
        - simulate
        - messages
      description: What a calendar tool books into. Roark runs it; it has no runtime.
    ToolMcp:
      type: object
      properties:
        mcpServerId:
          type: string
          format: uuid
          description: The MCP server the tool calls
        tool:
          type: string
          description: The tool as the server names it
          example: search_customers
        messages:
          $ref: '#/components/schemas/ToolMessages'
      required:
        - mcpServerId
        - tool
        - messages
      description: >-
        A tool on one of the project's MCP servers. The server runs it and
        defines its arguments.
    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
    ToolCalendarAppointmentType:
      type: object
      properties:
        name:
          type: string
          description: What the agent passes to name it
          example: checkup
        whenToUse:
          type:
            - string
            - 'null'
          description: The line that tells the agent when it applies
        eventTypeId:
          type:
            - integer
            - 'null'
          description: 'For Cal.com: the event type it books'
        calendarTargetId:
          type:
            - string
            - 'null'
          description: >-
            For a calendar with no scheduling of its own: the bookable target it
            books into, which carries the duration, buffers, notice, horizon and
            weekly hours
        eventTypeUri:
          type:
            - string
            - 'null'
          description: 'For Calendly: the event type it books, which Calendly names by URI'
        goHighLevelCalendar:
          type:
            - string
            - 'null'
          description: 'For GoHighLevel: the calendar it books into, by its own id'
        durationMinutes:
          type:
            - integer
            - 'null'
          description: Only for an event type offering several durations
      required:
        - name
        - whenToUse
        - eventTypeId
        - calendarTargetId
        - eventTypeUri
        - goHighLevelCalendar
        - durationMinutes
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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