Skip to main content
Glama

cursor_request

Destructive

Execute Cursor Agent CLI requests synchronously, supporting plan and ask modes with configurable model, output format, and session management.

Instructions

Run a Cursor Agent CLI request synchronously (auto-defers to a pollable job past the sync deadline when async jobs are enabled; otherwise runs to completion). Headless print mode (cursor-agent --print).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoCursor execution mode: plan (read-only planning) or ask (Q&A/read-only)
forceNoEmit --force (Cursor yolo mode; auto-allows commands unless explicitly denied)
modelNoModel name or alias passed via --model
trustNoTrust the workspace in headless mode (--trust)
addDirNoAdditional workspace root directories (--add-dir, repeatable)
promptYesPrompt text for Cursor Agent CLI
sandboxNoCursor sandbox mode override (--sandbox enabled|disabled)
sessionIdNoCursor chat/session ID to resume (emits --resume <id>). Note: the gw-* id minted for a brand-new gateway session is not resumable via sessionId; continue with resumeLatest:true.
transportNoTransport selector. Default `cli` uses cursor-agent --print. `acp` uses the native cursor-agent acp transport and fails closed unless [acp] and [acp.providers.cursor].runtime_enabled are true.cli
workspaceNoWorkspace directory or saved workspace name (--workspace). Remote HTTP/OAuth callers must pass a registered workspace alias; local stdio callers may pass local Cursor workspace paths.
autoReviewNoEmit --auto-review (Cursor Smart Auto classifier for tool calls)
forceRefreshNoBypass dedup and force a fresh CLI run even if a recent identical request exists
outputFormatNoCursor --output-format for --print modetext
resumeLatestNoResume the latest Cursor chat (--continue). Note: the gw-* id minted for a brand-new gateway session is not resumable via sessionId; continue with resumeLatest:true.
correlationIdNoRequest trace ID (auto if omitted)
idleTimeoutMsNoIdle timeout in ms (min 30s, max 1h, omit=CLI default)
approvalPolicyNoApproval policy when approvalStrategy is mcp_managed: strict|balanced|permissive (default balanced). Ignored under legacy strategy.
optimizePromptNoOptimize prompt before execution
approvalStrategyNoApproval strategy: legacy (default) lets Cursor's own flags decide; mcp_managed routes high-impact Cursor controls (force, trust, sandbox disabled) through the gateway approval gate.legacy
compressResponseNoCompress the response display text via the native compressor (default: [compression].enabled in config.toml, off unless opted in). Skipped for structured output.
createNewSessionNoForce a new session
optimizeResponseNoOptimize response output
Behavior4/5

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

The description adds behavioral context beyond annotations: synchronous execution, auto-deferral to pollable job, and headless print mode. Annotations already indicate destructive hint true; description provides timing and mode details.

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?

Two sentences, front-loaded with main action and key behavior details. Every sentence adds value without redundancy.

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

Completeness3/5

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

Given 22 parameters and no output schema, the description is adequate but lacks return format or error details. Adequate for basic usage but incomplete for complex scenarios.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline is 3. The tool description does not add additional meaning about parameters; it remains generic.

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 clearly states 'Run a Cursor Agent CLI request synchronously' with specific details about headless print mode and auto-deferral behavior. It distinguishes from sibling tools like cursor_request_async by emphasizing synchronous execution.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives (e.g., cursor_request_async). It mentions auto-deferral but lacks guidance on when synchronous vs async is appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/verivus-oss/llm-cli-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server