tools.cursor_tool module

Send prompts to Cursor IDE via cursor-agent CLI.

Requires the UNSANDBOXED_EXEC privilege or admin status. Supports targeting arbitrary repository directories.

async tools.cursor_tool.run(prompt, model='', directory='', timeout=3600, ctx=None)[source]

Execute this tool and return the result.

Parameters:
  • prompt (str) – The prompt value.

  • model (str) – Model to use for the subagent.

  • directory (str) – The directory value.

  • timeout (int) – Maximum wait time in seconds.

  • ctx (ToolContext | None) – Tool execution context providing access to bot internals.

Returns:

Result string.

Return type:

str