Skip to main content
Glama

cursor_run

Dispatch a task to the Cursor sub-agent and return a job id IMMEDIATELY. This tool never blocks: a real code task takes minutes, so poll with cursor_status.

Instructions

Dispatch a task to the Cursor sub-agent and return a job id IMMEDIATELY. This tool never blocks: a real code task takes minutes, so poll with cursor_status. tier=consult is read-only Q&A, tier=plan is read-only planning, tier=execute may write files and is always isolated in a git worktree.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>",
      "workspace": "<workspace>",
      "tier": "<tier>"
    },
    "name": "cursor_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
tierYes
modelNoOptional Cursor model id
promptYesThe task for the Cursor agent
workspaceYesAbsolute path, must be inside a configured workspace root
requestKeyNoOptional idempotency key; a repeat submission returns the same job
timeoutSecNoWall-clock ceiling for this job

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.2
    • addedInput schema / properties / requestKey
      Added value: +{
      +  "description": "Optional idempotency key; a repeat submission returns the same job",
      +  "type": "string"
      +}
  2. First observedv0.4.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations present, the description carries the whole burden and does well: it discloses the non-blocking async contract, that real code tasks take minutes, that tier=execute may write files, and that execution is isolated in a git worktree. An agent knows the safety profile and the execution model before calling.

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

Conciseness5/5

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

Three sentences, front-loaded with the dispatch-and-return-immediately fact before the polling instruction and tier semantics. Every clause carries usable information with no repetition of schema fields.

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?

For an async dispatch tool with no output schema, the description supplies the essential missing context: that it returns a job id rather than a result, and that results are retrieved through cursor_status. Nothing an agent needs to invoke it correctly is absent.

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 83%, so the schema already documents most parameters, making baseline 3. The description adds genuine meaning beyond the enum values by explaining what each tier implies for side effects and isolation, which the schema alone does not convey.

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?

States a specific verb and resource ('Dispatch a task to the Cursor sub-agent') plus the immediate effect ('return a job id IMMEDIATELY'), which tells an agent exactly what this call does. It is clearly distinguished from cursor_status, which the description names as the follow-up tool.

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

Usage Guidelines4/5

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

Explicitly says the call never blocks and that polling should be done with cursor_status, which is actionable routing guidance. It also frames the tier choice as a when-to-use decision (read-only Q&A vs planning vs writing). It does not address cursor_reply for follow-up turns, so it stops short of full alternative coverage.

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