Tool Testing
Test context graph tools without starting a phone call. Resolve available tools, execute world tools, and understand test-mode persistence.
The tool testing endpoints let you resolve all context graph tools (world tools, skills, integrations) for a service and execute world tools in isolation, without making a phone call. Skills and integrations are tested through their own dedicated test/invoke endpoints. This is useful during development for verifying tool behavior, debugging input/output schemas, and validating write operations before wiring tools into a live conversation flow.
Admin/owner only. Tool testing requires the tools:test scope, which is restricted to admin and owner roles.
Test-Mode Behavior
Tool testing changes the execution context, but it is not a universal sandbox. A non-dry-run test can persist data, and not every handler applies dry_run in the same way. Use test records and non-production credentials for any operation that could affect an external system.
Source tagging: supported writes are tagged
source="tool_test". Platform pipelines can use that provenance to exclude test data from production processing.Persistent tests: with
dry_run=false, write tools can create test-tagged records.Dry runs: writer-backed world tools are simulated when
dry_run=true. Surface handlers currently execute their normal test path, so do not assume that the flag prevents every write.Surface delivery: the platform blocks outbound delivery for surfaces created with the tool-test source.
Resolve Available Tools
Retrieve the full list of tools available for a given service, including their input schemas, types, tiers, and write classification.
List all tools available for a service's HSM with metadata.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
Missing or invalid credentials.
Insufficient permissions.
Validation Error
Voice agent service unavailable.
GET /v1/{workspace_id}/services/{service_id}/tools/resolve HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"tools": [
{
"tool_name": "text",
"tool_type": "text",
"description": "",
"input_schema": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"states": [
"text"
],
"tier": "world",
"is_write": false,
"additional_instructions": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
],
"service_id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}Execute a Tool
Execute a single tool in isolation with custom input parameters.
Run an HSM tool outside a live session for testing.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
world_tool — other tool families use their dedicated endpoints
Fully qualified tool name
Service ID that owns the HSM
Optional entity ID for context
If true, write tools are simulated without persistence
falseSuccessful Response
0falsetool_test""worldfalseMissing or invalid credentials.
Insufficient permissions.
Invalid request body.
Voice agent service unavailable.
POST /v1/{workspace_id}/tools/execute HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 212
{
"tool_type": "text",
"tool_name": "text",
"service_id": "123e4567-e89b-12d3-a456-426614174000",
"input_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"dry_run": false
}{
"result": null,
"duration_ms": 0,
"dry_run": false,
"source": "tool_test",
"tool_type": "",
"tier": "world",
"is_write": false,
"sub_tool_logs": [
{
"tool_name": "",
"input": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"output": "",
"duration_ms": 0,
"succeeded": true
}
],
"blocked_side_effects": [
"text"
],
"error": "text"
}Test a Skill
Execute a skill in isolation with the given input.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
Final result text produced by the skill
Total execution time in milliseconds
Number of input tokens consumed
Number of output tokens generated
Number of tokens served from cache
Number of agent reasoning rounds executed
Error message if the skill execution failed
Missing or invalid API key.
Insufficient permissions.
Skill not found.
Validation Error
POST /v1/{workspace_id}/skills/{skill_id}/test HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 103
{
"input": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"static_tool_mocks": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}{
"result": "text",
"duration_ms": 1,
"input_tokens": 1,
"output_tokens": 1,
"cached_tokens": 1,
"rounds": 1,
"sub_tool_logs": [
{
"tool_name": "text",
"input": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"output": "text",
"duration_ms": 1,
"succeeded": true,
"round": 1
}
],
"error": "text"
}Test an Integration Endpoint
Integration endpoints are addressed by integration and endpoint ID, not name.
Execute an integration endpoint with test parameters and return the full response pipeline breakdown. Requires Integration.view permission.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Inputs to POST /{integration_id}/endpoints/{endpoint_id}/test.
Successful Response
Full breadcrumb returned by the test handler.
HTTP status code from the upstream call.
Request duration in milliseconds.
0Number of retry attempts.
0Raw response body from the upstream call.
Response after Jinja response_template rendering, pre-truncation.
Final processed result (rendered + truncated to max_response_length).
Error message if the request failed.
Safe validation summary when client output is enabled but cannot be emitted.
Missing or invalid API key.
Insufficient permissions.
Integration or endpoint not found.
Validation Error
POST /v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_id}/test HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 102
{
"params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"auth_params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}{
"status_code": 1,
"duration_ms": 0,
"retries": 0,
"raw_response": null,
"rendered": "text",
"final_result": "text",
"error": "text",
"artifact": {
"type": "text",
"schema_version": "text",
"payload": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"artifact_error": "text"
}Invoke a Platform Function
Execute a registered function and return its rows.
Bound parameters are validated against the stored schema; ws_id
is auto-injected from the request context. Returns the executor's
shaped response (rows for returns=table, scalar value for
returns=scalar).
Permissions: Workspace.view (read role and above). Read-only
keys are intentionally allowed — invocation runs a stored,
pre-validated SELECT against catalogs the workspace SP already has
SELECT on; the gate on what can run is the deploy-time validator
(read-only invariant), not the per-call permission.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Invoke a registered function with caller-supplied args.
Successful Response
00Function not found
Bind validation failure
Rate limited
POST /v1/{workspace_id}/functions/{function_name}/invoke HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"input": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}{
"result": null,
"duration_ms": 0,
"row_count": 0
}Test a Platform Function
Test invoke — same as invoke + persists last_test_* on the row.
Returns 200 with status="fail" + populated error on
execution failure (instead of a 5xx) so the DC has a single
happy-path rendering.
Permissions: admin, owner.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Invoke a registered function with caller-supplied args.
Successful Response
Response shape for POST /v1/{ws}/functions/{name}/test.
Structural superset of :class:InvokeResponse. Adds status and
error so the DC can render the executor's failure detail inline
rather than a generic "Invocation failed." The underlying invoke
uses the same path; status / error are filled in by
service.test after catching any HTTPException (503) from the
executor, so the route never bubbles a 5xx for a logical SQL
failure — it's still a 200 with status=fail so the caller can
show the message.
Invariant (enforced by :func:_check_error_when_fail):
status == "fail" → error is not None and len(error) > 0.
00passFunction not found
Validation Error
Rate limited
POST /v1/{workspace_id}/functions/{function_name}/test HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"input": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}{
"result": null,
"duration_ms": 0,
"row_count": 0,
"status": "pass",
"error": "text",
"test_duration_ms": 1
}Invoke a Workspace Data Query
Workspace data queries are addressed by query ID, not name. See Workspace Data Queries for deployment and runtime guidance.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
00Workspace data query not found
Validation Error
Execution failed
POST /v1/{workspace_id}/data_queries/{query_id}/invoke HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"input": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}{
"result": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"duration_ms": 0,
"row_count": 0
}Last updated
Was this helpful?

