delegate
Send a prompt to Cursor Agent and wait for completion, returning the reply and session ID to continue the same session.
Instructions
Send a prompt to Cursor Agent and wait until that Cursor turn is terminal, including tool work and any sub-agent follow-up Cursor performs before it stops. Returns Cursor's reply and the sessionId to reuse. A second call for a session that is still running is rejected. You decide CONTINUE, COMPLETE, or BLOCKED. Do not shell out to the agent binary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fast | No | Request Cursor's fast tier. Leave false unless the user asks. Higher cost. | |
| mode | No | agent implements. plan asks Cursor to produce a plan and stop. ask is for a read-oriented question. The mode is an instruction to Cursor. | agent |
| model | No | Optional Cursor model id. Omit to keep Cursor's current default. | |
| effort | No | Exact effort value advertised by the selected model. Invalid values fail before the prompt and name the accepted set. | |
| prompt | Yes | Natural prompt for Cursor. Sent as written. Point at files and project documents instead of pasting them. | |
| context | No | Context-window option when the model advertises one, such as 272k or 1m. Omit unless the user asks. | |
| sessionId | No | Resume this Cursor session. Omit to start one. Use the sessionId from the previous result for follow-up work. | |
| workspace | Yes | Existing project directory Cursor will work in. Must not be the home directory or filesystem root. | |
| contextFiles | No | Files to attach. Text becomes resource links. Images (png, jpg, gif, webp, under 5MB) are sent inline when Cursor accepts them. Missing files are warnings, not failures. |