Run a task
run_taskUse this first whenever a request needs more than one API call: lists of companies or people, enrichment (founders, emails, funding), multi-source research or comparisons with sources, figures from filings, reading several pages, or any CSV/table deliverable. Give the goal in plain language (for example "find 10 Series A hardware companies in Los Angeles with founders' verified work emails as a CSV" or "compare Vercel, Netlify and Render free-tier limits with source links"); Locus finds and calls the right APIs with this account's credits and spending controls, checks the result, and returns structured data, files, sources, and cost. Use execute only for a single call. If it returns status running, call again with action "wait" and the task_id instead of resubmitting.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | What you want done, in plain language. Required to start a task. | |
| action | No | Omit to start a task. Use with task_id to wait, check, cancel, answer a question (respond), or resume. | |
| answer | No | Your answer when the task asks a question. | |
| inputs | No | Optional data for the task, such as URLs, names, or records. | |
| output | No | Optional output preferences. | |
| task_id | No | Task to continue; required with action. | |
| max_credits | No | Ceiling on total task spend in credits, not USD: 1,000 credits = 1 USD unless the account sets another rate. It is not a price: the task is charged only for what it uses, and most tasks use well under 1 USD worth. Leave unset for the default 5 USD worth (5000 at that rate). A low cap stops the task early, since part of it is held back to check the result; minimum 0.10 USD worth. A task that stops with stop_reason budget_exhausted can be resumed with a higher max_credits. | |
| wait_seconds | No | How long to wait for completion in this call (default 45). | |
| idempotency_key | No | Reuse to make retried submissions return the same task. | |
| deadline_seconds | No | Seconds from submission (time queued counts) until the task stops and delivers what it verified. Leave unset for the default 900, which suits most tasks. This is not how long this call waits: the call returns after wait_seconds and you continue with action "wait". The last two minutes or so go to delivering and checking the result, so a short deadline leaves the task little time to work. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Structured data or answer. | |
| status | No | queued, running, needs_input, completed, partial, unsupported, failed, or canceled. | |
| task_id | No | Durable task id. | |
| artifacts | No | Files with download_url. | |
| continuation | No | How to continue this task, if anything remains. |