> ## 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.

# Test Unsaved Tool

> Send a real test request for an HTTP tool definition that has not been saved yet, with the supplied arguments. Use an endpoint you control; the request is real.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/tools/test
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/test:
    post:
      tags:
        - Tools
      summary: Test Unsaved Tool
      description: >-
        Send a real test request for an HTTP tool definition that has not been
        saved yet, with the supplied arguments. Use an endpoint you control; the
        request is real.
      operationId: test_unsaved_tool_api_v1_tools_test_post
      parameters:
        - 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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolUnsavedTestRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolTestResponse'
        '400':
          description: The tool definition cannot be tested.
        '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:
    ToolUnsavedTestRequest:
      properties:
        llm_params:
          additionalProperties: true
          type: object
          title: Llm Params
          description: Values for parameters normally supplied by the model.
        preset_params:
          additionalProperties: true
          type: object
          title: Preset Params
          description: Resolved values for parameters normally supplied from presets.
        name:
          type: string
          maxLength: 255
          title: Name
          description: Tool name, used only in server logs.
          default: Unsaved tool
        definition:
          $ref: '#/components/schemas/HttpApiToolDefinition'
          description: The HTTP API tool definition to run.
      type: object
      required:
        - definition
      title: ToolUnsavedTestRequest
      description: >-
        Request body for testing an HTTP API tool definition that has not been
        saved (the form as it is now).
    ToolTestResponse:
      properties:
        status:
          type: string
          title: Status
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
        data:
          anyOf:
            - {}
            - type: 'null'
          title: Data
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        hint:
          anyOf:
            - type: string
            - type: 'null'
          title: Hint
        request_method:
          type: string
          title: Request Method
        request_url:
          type: string
          title: Request Url
        request_headers:
          additionalProperties:
            type: string
          type: object
          title: Request Headers
        request_body:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Request Body
        request_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Request Params
        duration_ms:
          type: integer
          title: Duration Ms
      type: object
      required:
        - status
        - request_method
        - request_url
        - duration_ms
      title: ToolTestResponse
      description: Result of testing an HTTP API tool.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HttpApiToolDefinition:
      properties:
        schema_version:
          type: integer
          title: Schema Version
          description: Schema version.
          default: 1
        messages:
          items:
            anyOf:
              - $ref: '#/components/schemas/ToolStartTextMessage'
              - $ref: '#/components/schemas/ToolStartAudioMessage'
              - $ref: '#/components/schemas/ToolDelayedTextMessage'
              - $ref: '#/components/schemas/ToolDelayedAudioMessage'
          type: array
          maxItems: 220
          title: Messages
          description: >-
            Configured speech. An empty list disables announcements. HTTP/MCP
            choose one start entry and one entry per delayed timing at random.
            End-call and transfer tools support one start entry only.
        type:
          type: string
          const: http_api
          title: Type
          description: Tool type.
        config:
          $ref: '#/components/schemas/HttpApiConfig'
          description: HTTP API configuration.
      type: object
      required:
        - type
        - config
      title: HttpApiToolDefinition
      description: Tool definition for HTTP API tools.
    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
    ToolStartTextMessage:
      properties:
        type:
          type: string
          const: text
          title: Type
        text:
          type: string
          minLength: 1
          title: Text
        event:
          type: string
          const: start
          title: Event
      additionalProperties: false
      type: object
      required:
        - type
        - text
        - event
      title: ToolStartTextMessage
    ToolStartAudioMessage:
      properties:
        type:
          type: string
          const: audio
          title: Type
        recording_id:
          type: integer
          exclusiveMinimum: 0
          title: Recording Id
        event:
          type: string
          const: start
          title: Event
      additionalProperties: false
      type: object
      required:
        - type
        - recording_id
        - event
      title: ToolStartAudioMessage
    ToolDelayedTextMessage:
      properties:
        type:
          type: string
          const: text
          title: Type
        text:
          type: string
          minLength: 1
          title: Text
        event:
          type: string
          const: delayed
          title: Event
        after_ms:
          type: integer
          maximum: 120000
          exclusiveMinimum: 0
          title: After Ms
      additionalProperties: false
      type: object
      required:
        - type
        - text
        - event
        - after_ms
      title: ToolDelayedTextMessage
    ToolDelayedAudioMessage:
      properties:
        type:
          type: string
          const: audio
          title: Type
        recording_id:
          type: integer
          exclusiveMinimum: 0
          title: Recording Id
        event:
          type: string
          const: delayed
          title: Event
        after_ms:
          type: integer
          maximum: 120000
          exclusiveMinimum: 0
          title: After Ms
      additionalProperties: false
      type: object
      required:
        - type
        - recording_id
        - event
        - after_ms
      title: ToolDelayedAudioMessage
    HttpApiConfig:
      properties:
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
          title: Method
          description: HTTP method to use for the request.
          llm_hint: Use one of GET, POST, PUT, PATCH, DELETE.
        url:
          type: string
          title: Url
          description: Target HTTP or HTTPS URL.
          llm_hint: >-
            Use the final endpoint URL. Authentication belongs in
            credential_uuid, not embedded in the URL.
        headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Headers
          description: Static headers to include with every request.
          llm_hint: >-
            Do not place secrets here. Store secrets in the UI credential
            manager and reference them with credential_uuid.
        credential_uuid:
          anyOf:
            - type: string
            - type: 'null'
          title: Credential Uuid
          description: Reference to an external credential for request authentication.
          llm_hint: >-
            Use a credential_uuid returned by list_credentials. The MCP flow
            does not create credential secrets.
        parameters:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolParameter'
              type: array
            - type: 'null'
          title: Parameters
          description: Parameters the model must provide when calling this tool.
        preset_parameters:
          anyOf:
            - items:
                $ref: '#/components/schemas/PresetToolParameter'
              type: array
            - type: 'null'
          title: Preset Parameters
          description: >-
            Parameters injected by Athena from fixed values or workflow context
            templates.
        timeout_ms:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Timeout Ms
          description: Request timeout in milliseconds.
          default: 5000
        require_approval:
          anyOf:
            - type: string
              enum:
                - always
                - never
            - type: 'null'
          title: Require Approval
          description: >-
            Ask the caller to confirm the exact action before this tool runs:
            'always' or 'never'. Unset means 'never' (runs as soon as the agent
            picks it).
          llm_hint: >-
            Use 'always' for actions that change or delete something (cancel,
            pay, send, delete).
        body_template:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Body Template
          description: Optional JSON body template for POST, PUT, and PATCH requests.
          llm_hint: >-
            Use {{parameter_name}} placeholders to position LLM and preset
            parameters anywhere in the body, including nested objects and
            arrays; also {{initial_context.*}}. A value that is exactly one
            placeholder keeps the value's original JSON type. Omit this field to
            send all parameters as a flat top-level JSON object. Ignored for GET
            and DELETE.
        body_format:
          type: string
          enum:
            - json
            - form
          title: Body Format
          description: >-
            Encoding of the POST, PUT, and PATCH request body: 'json' sends
            application/json, 'form' sends application/x-www-form-urlencoded.
          default: json
          llm_hint: >-
            Use 'form' only for APIs that accept form-encoded bodies and reject
            JSON. In form mode, list values repeat the field name once per item
            and object values are sent as JSON strings.
      additionalProperties: false
      type: object
      required:
        - method
        - url
      title: HttpApiConfig
      description: Configuration for HTTP API tools.
    ToolParameter:
      properties:
        name:
          type: string
          title: Name
          description: Parameter name used as a key in the tool request body.
          llm_hint: Use a stable snake_case name the agent can naturally fill.
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - object
            - array
          title: Type
          description: JSON type for the parameter value.
          llm_hint: Allowed values are string, number, boolean, object, and array.
        description:
          type: string
          title: Description
          description: Description shown to the model for this parameter.
          llm_hint: >-
            Write this as an instruction to the agent: what value to provide and
            when.
        required:
          type: boolean
          title: Required
          description: Whether this parameter is required when the tool is called.
          default: true
      type: object
      required:
        - name
        - type
        - description
      title: ToolParameter
      description: A parameter that the tool accepts from the model at call time.
    PresetToolParameter:
      properties:
        name:
          type: string
          title: Name
          description: Parameter name used as a key in the request body.
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - object
            - array
          title: Type
          description: JSON type for the resolved value.
          llm_hint: Allowed values are string, number, boolean, object, and array.
        value_template:
          type: string
          title: Value Template
          description: Fixed value or template, e.g. {{initial_context.phone_number}}.
          llm_hint: >-
            Use {{initial_context.*}} for call-start context and
            {{gathered_context.*}} for values extracted during the call.
        required:
          type: boolean
          title: Required
          description: Whether the parameter must resolve to a non-empty value.
          default: true
      type: object
      required:
        - name
        - type
        - value_template
      title: PresetToolParameter
      description: A parameter injected by Athena at runtime.
  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.