v2
OpenAPI 3.0.02026-08-051996591.2 MBTools
Test Lambda tool
Tests an existing Lambda tool by executing it with test inputs. Use this to verify a function works correctly before agents use it. Optionally supply a test_context with stand-in agent metadata, secrets, and session metadata. The $refs in the tool's stored tool_configurations resolve against these values. The function runs in a secure sandbox environment with the same constraints as production.
post/v2/tools/{tool_id}/test
Path parameters
tool_idstring required
Example:tol_python_function_123
The unique identifier of the Lambda tool to test.
Headers
Request-Timeoutinteger
The platform makes a best effort to complete the request in the specified seconds, or it times out.
Request-Timeout-Millisinteger
The platform makes a best effort to complete the request in the specified milliseconds, or it times out.
Request body
Example request
{
"input": {
"number": 42,
"text": "Hello, world!"
},
"timeout_seconds": 10,
"test_context": {
"agent": {
"metadata": {
"ticket_api_base": "https://tickets.example.com/api/v1/"
},
"secrets": {
"ticket_api_token": "test-token"
}
},
"session": {
"metadata": {
"tenant_corpus": "kb"
}
}
}
}Response
The test execution results.
Example response
{
"type": "success",
"output": {
"result": 1764,
"message": "Computed successfully"
},
"latency_millis": 125,
"memory_used_mb": 32,
"validation_results": {
"input_valid": true,
"output_valid": true,
"validation_errors": [
"Output missing required field 'result'"
]
}
}