Back to Tools and Actions

In this article

Accessing the Testing Interface

When viewing or editing a custom tool, navigate to the 'Testing' tab in the tool configuration interface.

Running a Tool Test

The testing interface automatically uses all the configuration settings you've already provided for the tool (URL, method, headers, body, authentication).

To test your tool:

  1. Review your tool configuration to ensure it's complete.
  2. Click the 'Test Tool' button in the testing tab.
  3. The system will validate your tool configuration before sending the request. If any configuration errors are detected, you'll receive validation warnings.

Viewing Test Results

After running a test, results are displayed in a tabbed interface with two main views:

1. Response View:

The default view showing information about the API response:

  • Status Code & Badge: Shows the HTTP status code (e.g., 200 OK, 401 Unauthorized) with a colored badge indicating success or failure.
  • Response Size: The size of the returned data.
  • Response Data: The actual content returned by the API, typically formatted as JSON.
  • Response Headers: HTTP headers returned by the API.

2. Request View:

Click the 'Request' tab to see details about what was sent to the API:

  • Request URL: The full URL that was called, including any path parameters.
  • Request Method: The HTTP method used (GET, POST, etc.).
  • Request Headers: All headers sent with the request, including any authentication headers.
  • Request Body: For POST/PUT requests, the data payload that was sent.

For large responses, you can click the 'Expand' button to view the data in a larger dialog for better readability.

Interpreting Test Results

The testing interface will display the outcome of the test run, with clear visual indicators:

  • Success (Green): Status codes in the 200-299 range indicate the request was successful. The response body should contain the data you expected.
  • Client Error (Red): Status codes in the 400-499 range indicate a client-side error (e.g., 401 Unauthorized for authentication issues, 404 Not Found if the resource doesn't exist).
  • Server Error (Red): Status codes in the 500-599 range indicate a server-side error in the external API.

Examine both the status code and the response body to determine if your tool is working as expected. For successful API calls, verify that the data structure matches what your voice agent will need to process.

Troubleshooting Common Issues

If the test fails, examine the results carefully:

  • Authentication Errors (e.g., 401, 403): Double-check your authentication configuration in the Authentication tab. Verify the API key, token, or credentials are correct and properly formatted.
  • Not Found Errors (404): Verify the API endpoint URL is correct. Check if variables in the URL path are being populated correctly.
  • Bad Request Errors (400): Review the request body structure. Ensure it matches the external API's requirements and that the Content-Type header is set correctly, typically to 'application/json'.
  • Server Errors (5xx): The external API might be experiencing issues. Check its status or try again later.
  • Validation Errors: If you see validation warnings before the test runs, fix those configuration issues first.

The Request view tab is particularly helpful for troubleshooting as it shows exactly what was sent to the API, allowing you to compare it with the API documentation requirements.