Invoke target tools
Invoke up to 8 monit-agent tools concurrently on a single target. Results come back in the order of the input tools array. Long-running — individual tools have per-tool timeouts on the agent and the whole request may take tens of seconds.
Restrictions
Usage
- Up to 8 tools per call (
MaxToolsPerInvoke); larger batches must be split client-side. The 8-tool cap aligns with the per-target agent concurrency. - Tools execute in parallel on the agent; webapi returns
results[]aligned with the requesttools[]order. - Long-running: set client timeouts to at least 35 s. The endpoint is intended for AI-SRE / human-RCA flows, not interactive UI.
- Request-level errors (
target_unavailable,ambiguous_target_kind,forward_failed) appear as HTTP 200 withdata.errorset anddata.results = []. - Per-tool failures appear as HTTP 200 with
data.errorabsent andresults[i].errorpopulated — always check all three layers (outer envelopeerror,data.error, then eachresults[i].error). - The response uses sparse fields: absent means empty. On success
erroris omitted entirely rather than sent asnull; on failuredata,summaryandtruncatedare omitted. Do not key logic off placeholdernullfields, and do not expecttargetwhen the locator could not be uniquely resolved. results[i].datais the tool payload with the monit-agent result envelope already unwrapped — there is no nesteddata.data. The one-line distillation isresults[i].summary, andresults[i].truncated(carrying areason) appears only when the result was genuinely truncated.results[i].paramsechoes the params webapi received for that tool, so batched calls stay correlatable even when an individual tool fails.- Construct
tools[].paramsagainst theinput_schemareturned by/monit/tools/catalog. For no-arg tools always passparams: {}explicitly.
Authorizations
App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.
Body
Target identifier. Same validation rules as /monit/tools/catalog.
Up to 8 tool calls; webapi executes them concurrently and returns results in input order.
1 - 8 elementsOptional consistency check. Must equal the authenticated account when supplied.
Optional target kind; auto-inferred when omitted.
Response
Success
Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.