client.tools
Custom tools assistants can call. These methods are on client.tools, where client is a MoreVoice client (see the Python SDK). On AsyncMoreVoice the same methods are awaited. Each one returns the response object and raises an exception when the API answers with an error.
test()
Section titled “test()”Test a custom tool. Runs a custom tool once with the arguments you give, the way a call runs it: the same request body, signed with your tool signing secret (Standard Webhooks headers; test-mode keys sign with the test secret) and sent through the same network guard. Webhook failures (an HTTP error, a timeout) are reported in the result; a URL that cannot be called at all is a 400.
def test(self, body: _m.ToolsTestBody | Mapping[str, Any] | Unset = UNSET, *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.ToolTestclient.tools.test() · await async_client.tools.test() · POST /tools/test · API reference
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
arguments |
object |
no | The arguments, as the model would pass them (default {}). |
assistant_id |
string |
no | The assistant whose stored tool (with its stored headers) to test. |
tool |
CustomToolParamsInput |
no | A custom tool as you send it. headers are write-only: stored with the assistant, never returned. |
tool_name |
string |
no | The stored tool’s name (with assistant_id). |
Returns
Section titled “Returns”ToolTest:
| Field | Type | Description |
|---|---|---|
object |
"tool_test" |
Always tool_test. |
livemode |
boolean |
true in live mode, false in test mode. |
tool |
string |
The tool’s name. |
type |
"webhook" | "mock" |
webhook tools were called over HTTP (signed); mock tools answered their mock_response. |
ok |
boolean |
true when the tool answered (a 2xx for webhooks). |
duration_ms |
integer |
How long the tool took. |
result |
any |
What the model would receive: the parsed JSON (or text) of the answer. |
error |
object | null |
null when ok. |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
tool_test = client.tools.test({ "arguments": { "date": "2026-11-04", }, "tool": { "headers": { "Authorization": "Bearer crm-secret", }, "name": "find_slots", "timeout_seconds": 10, "url": "https://crm.example.com/voice/tools", },})print(tool_test)