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

# Probe a tool's endpoint and report whether it works

> A broken tool fails silently during a conversation. Non-safe methods are probed with OPTIONS so the probe cannot cause a side effect.

A broken tool fails silently during a conversation. Non-safe methods are probed with OPTIONS so the probe cannot cause a side effect.

### Path parameters

<ParamField path="id" type="string (uuid)" required>
  The tool id.
</ParamField>

### Response

`object`

<ResponseField name="object" type="string" required />

<ResponseField name="function_id" type="string,null (uuid)" required />

<ResponseField name="endpoint" type="string" required>
  The tool's stored endpoint URL.
</ResponseField>

<ResponseField name="method" type="string" required>
  The tool's configured HTTP method (upper-cased; `GET` when unset).
</ResponseField>

<ResponseField name="probe_method" type="string" required>
  The method actually sent: `method` if it is GET/HEAD/OPTIONS, otherwise `OPTIONS`.
</ResponseField>

<ResponseField name="ok" type="boolean" required>
  True only for a 2xx status.
</ResponseField>

<ResponseField name="verdict" type="string" required />

<ResponseField name="status" type="integer">
  The HTTP status returned. Absent when the endpoint timed out or was unreachable.
</ResponseField>

<ResponseField name="hint" type="string">
  What to fix. Present for every verdict except `working` and `unexpected_status`.
</ResponseField>

<ResponseField name="note" type="string">
  Present only when `probe_method` differs from `method`: explains that reachability and auth were checked but the operation itself was not.
</ResponseField>

<ResponseField name="duration_ms" type="integer" required />

<ResponseField name="response_preview" type="string,null">
  The first 2000 characters of the response body. Absent when the endpoint timed out or was unreachable; null when the body was empty or unreadable.
</ResponseField>

### Status codes

| Code  | Meaning                                                                                                                                                                   |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200` | The probe result. Non-safe methods (anything but GET/HEAD/OPTIONS) are probed with OPTIONS so the probe never causes a side effect; redirects are reported, not followed. |
| `401` | Missing, invalid, or expired API key.                                                                                                                                     |
| `403` | The key lacks a required scope.                                                                                                                                           |
| `404` | Not found, or not in the organization that owns the key.                                                                                                                  |
| `429` | Rate limit exceeded.                                                                                                                                                      |

### Access

|                |                        |
| -------------- | ---------------------- |
| Required scope | `agents:read`          |
| Rate limit     | 10 requests per minute |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://response.stateset.com/api/v1/functions/{id}/test' \
    --header "Authorization: Bearer $RESPONSECX_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "object": "function.test_result",
    "function_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "endpoint": "https://example.com/webhooks/stateset",
    "method": "string",
    "probe_method": "string",
    "ok": true,
    "verdict": "working",
    "status": 1,
    "hint": "string",
    "note": "Two-person tent, green — replacement for damaged pole set.",
    "duration_ms": 8,
    "response_preview": "string"
  }
  ```
</ResponseExample>
