Skip to main content
Glama

cursor_run

Dispatches a code task to the Cursor sub-agent and returns a job id immediately without blocking. Poll with cursor_status; choose consult, plan, or execute tiers.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tierYes
modelNoOptional Cursor model id
promptYesThe task for the Cursor agent
workspaceYesAbsolute path, must be inside a configured workspace root
timeoutSecNoWall-clock ceiling for this job

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses asynchronous non-blocking behavior and that execute is isolated in a git worktree. It does not cover failure modes, timeouts, or authentication/workspace-root requirements beyond what the schema states.

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?

Front-loads the key fact (dispatch and return immediately, never blocks) and follows with polling instruction and tier semantics. Every sentence adds information; no filler.

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

Completeness4/5

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

There is no output schema, but the description states the return is a job id, which is the essential return value. It lacks detail on what happens on failure or how cursor_reply/cursor_cancel interact, but an agent has enough to invoke it correctly.

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 80%, so the baseline is 3, but the description adds substantial meaning for the tier enum (read-only vs. write-capable, worktree isolation) that the schema enum alone does not supply. model and timeoutSec are left entirely to the schema, so it does not fully compensate.

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 return ('job id'). It distinguishes itself from the sibling query tools by emphasizing that it never blocks and defers results to cursor_status.

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?

Explicitly tells the agent to poll with cursor_status because a real task takes minutes. It also gives selection guidance among the tier options: consult/plan are read-only Q&A/planning, execute may write files.

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