Skip to main content
Glama
newxun
by newxun

Cursor: run agent

cursor_run_agent
Destructive

Execute a coding agent in a working directory to read, edit, write files and run shell commands, returning an agent ID for follow-up conversations.

Instructions

Run a Cursor Agent (local runtime) against a working directory and return the final result. The agent can read, edit, and write files and run shell commands in cwd. Returns an agentId you can pass to cursor_follow_up to continue the same conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesInstruction for the Cursor Agent.
cwdYesAbsolute path to the working directory the agent operates in.
modelNoModel id (e.g. "composer-2.5"). Defaults to the server default ("auto").
modeNo"agent" implements changes directly; "plan" explores and plans first.
Behavior5/5

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

Description aligns with annotations: confirms destructive hint via file write/shell commands, open-world hint via flexibility. Adds agentId follow-up detail. No contradictions.

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: first sentence states purpose, second adds capabilities and follow-up. No extraneous words, efficient structure.

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?

Description covers what the agent does and follow-up reference. No output schema, so mention of agentId is helpful. Could elaborate on return format, but sufficient for selection.

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 coverage is 100%, so description does not need to add param details. Description provides operational context but does not enhance individual parameter meaning beyond schema.

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?

Clearly states verb 'run', resource 'Cursor Agent', and scope 'against a working directory'. Distinguishes from sibling tools by mentioning cursor_follow_up for continuation.

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?

Provides some context by listing agent capabilities (read, edit, write files, run commands) but does not explicitly state when to use this tool versus alternatives or when not to use it.

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/newxun/cursor-sdk-mcp'

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