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

# Get Tools Usage

> For each tool in the organization: the agents that use it and its health over the last `days` days (calls, failures, median and 95th-percentile time, last use). Read from completed runs.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/tools/usage
openapi: 3.1.0
info:
  title: Athena API
  version: 1.0.0
  description: >-
    Hosted Athena customer API. Authenticate backend management and call-trigger
    requests with X-API-Key. Website embeds and artifact playback use their own
    scoped tokens. Provider availability, feature settings, and verification
    limits are described in the guides.
servers:
  - url: https://athena.tryopencomputer.com
    description: Hosted Athena API
security: []
paths:
  /api/v1/tools/usage:
    get:
      tags:
        - Tools
      summary: Get Tools Usage
      description: >-
        For each tool in the organization: the agents that use it and its health
        over the last `days` days (calls, failures, median and 95th-percentile
        time, last use). Read from completed runs.
      operationId: get_tools_usage_api_v1_tools_usage_get
      parameters:
        - name: days
          in: query
          required: false
          schema:
            type: integer
            maximum: 30
            minimum: 1
            default: 7
            title: Days
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolUsageResponse'
        '401':
          description: Authentication is missing or invalid.
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    ToolUsageResponse:
      properties:
        window_days:
          type: integer
          title: Window Days
        since:
          type: string
          format: date-time
          title: Since
        runs_scanned:
          type: integer
          title: Runs Scanned
        truncated:
          type: boolean
          title: Truncated
          description: True when more runs matched than were read (oldest left out).
        tools:
          additionalProperties:
            $ref: '#/components/schemas/ToolUsageSummary'
          type: object
          title: Tools
      type: object
      required:
        - window_days
        - since
        - runs_scanned
        - truncated
      title: ToolUsageResponse
      description: >-
        GET /tools/usage: every tool of the organization that is used by an
        agent or ran in the window.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ToolUsageSummary:
      properties:
        agents:
          items:
            $ref: '#/components/schemas/ToolDependentAgent'
          type: array
          title: Agents
        health:
          $ref: '#/components/schemas/ToolHealth'
      type: object
      title: ToolUsageSummary
      description: Which agents use a tool and how it ran over the window.
    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
    ToolDependentAgent:
      properties:
        workflow_id:
          type: integer
          title: Workflow Id
        name:
          type: string
          title: Name
        status:
          type: string
          title: Status
          description: The agent's own status (active or archived).
        released:
          type: boolean
          title: Released
          description: The released version (what calls run) uses the tool.
        draft:
          type: boolean
          title: Draft
          description: The unpublished draft uses the tool.
        nodes:
          items:
            type: string
          type: array
          title: Nodes
          description: Names of the steps that use the tool.
        campaigns:
          items:
            $ref: '#/components/schemas/ToolDependentCampaign'
          type: array
          title: Campaigns
          description: >-
            Campaigns whose traffic split pins a version of this agent that uses
            the tool.
      type: object
      required:
        - workflow_id
        - name
        - status
        - released
        - draft
      title: ToolDependentAgent
      description: >-
        An agent whose released or draft definition puts this tool on one of its
        steps (nodes[].data.tool_uuids).
    ToolHealth:
      properties:
        calls:
          type: integer
          title: Calls
          default: 0
        failed:
          type: integer
          title: Failed
          default: 0
        unknown:
          type: integer
          title: Unknown
          description: Calls with no stored result to pair (no result or duration).
          default: 0
        median_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Median Ms
        p95_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: P95 Ms
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
        daily:
          items:
            type: integer
          type: array
          title: Daily
          description: >-
            Calls per 24 hours, oldest first, ending now (one entry per day of
            the window).
      type: object
      title: ToolHealth
      description: >-
        A tool's calls over a time window, rebuilt read-only from the runs'
        stored logs.


        Each call is a ``tool.invocation`` log event whose ``executorRef`` names
        the tool (``tool:<uuid>:<function>``).

        Result and duration come from the ``native.tool_record`` event stored
        when that call's result went back to the

        voice model (the same pairing as the run's Activity view). Native voice
        path only.
    ToolDependentCampaign:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: ToolDependentCampaign
      description: >-
        A not-finished campaign whose traffic split pins an agent version that
        uses the tool.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

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