Mandala
Tools

Karma RPA Capability

Dispatch a Karma RPA job or check its status, without blocking

Usage Instructions

Bind one specific Karma RPA client + capability so an Agent block can dispatch it (fire-and-forget -- it returns as soon as the client accepts the job, not when the capability finishes) or check a previously dispatched job's status. For a workflow step that should wait for the result inline, use the Karma RPA block instead.

Tools

rpa_dispatch_job

Starts a job on a connected Karma RPA client and returns immediately once the client has accepted it -- it does NOT wait for the capability to finish (that can take minutes). The response only tells you the job started running, with a jobId. To find out how it turned out, call rpa_job_status with that jobId -- if it is not done yet, use defer_check to come back and check again later rather than calling rpa_job_status repeatedly in a tight loop. If the target capability has not been pre-approved by an admin, this call fails immediately with an 'approval_required' error instead of starting anything.

Input

ParameterTypeRequiredDescription
clientIdstringYesThe registered RPA client this agent tool is bound to.
capabilityNamestringYesThe bound client's capability to invoke.
inputjsonNoInput parameters for the capability, matching its published inputSchema.

Output

ParameterTypeDescription
jobIdstringThe created rpa_job row id -- pass this to rpa_job_status later.
statusstringAlways 'running' on success -- the client has started the job.
reasonstringMachine-readable failure reason when unsuccessful

rpa_job_status

Checks the current status of an RPA job previously started with rpa_dispatch_job, given its jobId. Returns the job's status ('dispatched', 'running', 'completed', 'failed', 'timed_out', or 'client_disconnected') and, once it has finished, the capability's output (or an error). This is a plain status read -- it does not wait for the job to finish. If the job is still 'dispatched' or 'running', use defer_check to come back and call this again later instead of calling it repeatedly in a tight loop.

Input

ParameterTypeRequiredDescription
jobIdstringYesThe jobId returned by a previous rpa_dispatch_job call.

Output

ParameterTypeDescription
statusstringThe job's current lifecycle status: dispatched, running, completed, failed, timed_out, or client_disconnected.
outputobjectThe capability's result, once completed
errorstringA description of what went wrong, when the job did not complete

Notes

  • Category: tools
  • Type: karma_rpa_agent_tool
Karma RPA Capability