Skip to main content
Glama

cursor_request_async

Destructive

Start a durable background job for Cursor Agent CLI requests, then check progress with job status and collect the final output when ready.

Instructions

Start a Cursor Agent CLI request as a durable background job. Poll with llm_job_status, collect with llm_job_result.

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
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.
workspaceNoWorkspace directory or saved workspace name (--workspace). This async tool always uses the CLI transport; remote HTTP/OAuth callers must pass a registered workspace alias, while local callers may pass local Cursor workspace paths.
autoReviewNoEmit --auto-review (Cursor Smart Auto classifier for tool calls)
workingDirNoLocal Cursor Agent process working directory. Distinct from --workspace, which selects a Cursor workspace or saved workspace name; this sets the process cwd. Passing both an absolute workspace path and a different workingDir is rejected rather than silently ranked. Stdio/local callers may pass local paths directly. Remote HTTP/OAuth callers must use relative paths inside a selected registered workspace. Do not call workspace_* tools to fix stdio/local provider path access.
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)
idleTimeoutMsNoTotal-runtime bound, not an idle timer: this provider emits no output until it exits, so the child is killed after this duration even while healthy. Min 30s, max 1h, omit=1h default. Cursor only: this holds for the default text invocation; with outputFormat stream-json the CLI streams incrementally, so the same timer behaves as a genuine idle window.
providerFlagsNoFlags passed to the provider binary verbatim, keyed exactly as the binary spells them (e.g. {"--best-of-n": "3", "--verbatim": true, "--rules": ["a", "b"]}). Use this for any flag your installed CLI accepts that this schema does not name: the binary decides what it supports, not the gateway. true emits the flag alone; a list REPEATS the flag once per item (pass a joined string if your CLI wants a comma-separated value). Values may not start with '-', and a flag the gateway is already emitting for this request is refused rather than duplicated. LOCAL stdio callers only: remote HTTP/OAuth callers are refused every flag here and should use this tool's declared parameters, which carry their own host-path and approval gates.
approvalPolicyNoapprovalPolicy is unavailable for this provider. It has no effect with legacy, and mcp_managed is rejected before launch because ambient MCP configuration cannot be isolated.
optimizePromptNoOptimize prompt before execution
approvalStrategyNoApproval strategy: legacy is supported. mcp_managed is rejected before launch because this adapter cannot isolate ambient MCP configuration.legacy
compressResponseNoCompress the response display text when collected via llm_job_result (native compressor; default: [compression].enabled).
createNewSessionNoForce a new session

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv3.2.0
  2. Removedv3.0.0
  3. First observedv2.16.0

TDQS

A4.4/5.0
Behavior5/5

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

The description adds meaningful behavioral context beyond annotations: the request runs as a durable background job rather than blocking, and results are retrieved separately through the poll/collect pattern. Combined with the rich schema-level behavior (no output until exit, total-runtime timeout, yolo mode, rejection of mcp_managed), the agent gets a solid picture of how this tool behaves. No contradiction with annotations.

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 with zero waste. The first sentence front-loads the core action and durable-background nature, and the second gives the essential follow-up workflow. Every word earns its place.

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?

For a tool with 22 parameters and complex provider-specific constraints, the description is quite complete because the schema carries the heavy parameter-level burden and the description covers the job lifecycle. It falls slightly short by not explicitly naming the synchronous cursor_request alternative or stating when to use the async form, but the 'durable background job' phrasing and poll/collect instructions make the core workflow clear.

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 the baseline of 3 applies. The tool description itself does not add parameter-specific semantics beyond the schema; the mention of poll and collect relates to job lifecycle rather than any input parameter. It neither worsens nor improves on the schema's already thorough parameter documentation.

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 resource: 'Start a Cursor Agent CLI request as a durable background job.' This clearly distinguishes it from the synchronous cursor_request sibling and from other providers' async tools. It also signals the intended follow-up via llm_job_status and llm_job_result, making the purpose unambiguous.

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?

The description gives clear usage context: this is a background job that should be polled with llm_job_status and collected with llm_job_result. However, it does not explicitly explain when to prefer this over the synchronous cursor_request or other async variants, so the guidance stops short of full when/not-to-use routing.

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

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