Skip to main content
Glama

Run a task

run_task

Use 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

NameRequiredDescriptionDefault
goalNoWhat you want done, in plain language. Required to start a task.
actionNoOmit to start a task. Use with task_id to wait, check, cancel, answer a question (respond), or resume.
answerNoYour answer when the task asks a question.
inputsNoOptional data for the task, such as URLs, names, or records.
outputNoOptional output preferences.
task_idNoTask to continue; required with action.
max_creditsNoCeiling 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_secondsNoHow long to wait for completion in this call (default 45).
idempotency_keyNoReuse to make retried submissions return the same task.
deadline_secondsNoSeconds 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

NameRequiredDescriptionDefault
resultNoStructured data or answer.
statusNoqueued, running, needs_input, completed, partial, unsupported, failed, or canceled.
task_idNoDurable task id.
artifactsNoFiles with download_url.
continuationNoHow to continue this task, if anything remains.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / max_credits / description
      Previous value: -"Hard cap on total task spend in credits, not USD: 1,000 credits = 1 USD unless the account sets another rate. Default 5 USD worth (5000 at that rate), minimum 0.10 USD worth."New value: +"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."
  2. Changed2 schema fields changed
    • changedInput schema / properties / deadline_seconds / description
      Previous value: -"Stop and deliver what is verified after this many seconds (default 900)."New value: +"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."
    • changedInput schema / properties / deadline_seconds / minimum
      Previous value: -30New value: +180
  3. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description explains that Locus finds and calls the right APIs using this account's credits and spending controls, checks the result, and returns structured data, files, sources, and cost. It also discloses the task lifecycle for running tasks and the option to continue rather than resubmit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the key routing rule and then covers examples, behavior, and continuation guidance. It is somewhat dense and long, but most of the content earns its place given the complexity of the task runner and the need to distinguish it from execute.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 10-parameter schema, output schema, and open-world task-running behavior, the description is complete enough for an agent to select and invoke the tool correctly. It covers purpose, alternatives, task lifecycle, spending controls, and the kinds of returns to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all parameters in detail. The description adds meaningful usage semantics for goal in plain language and for the action/task_id continuation flow, though it does not further explain output, max_credits, deadline_seconds, or idempotency_key beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and scope: use this first when a request needs more than one API call. It gives concrete examples of multi-call work and explicitly distinguishes the tool from execute, which is reserved for a single call.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides explicit when-to-use guidance: multi-call goals, enrichment, multi-source research, filings, multi-page reading, and CSV/table deliverables. It also names the alternative for single calls and tells the agent to continue with action "wait" and task_id when a task is running.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.