Files
cursor-byok/prompt/agent/tools.json
T
2026-08-20 12:56:49 +08:00

688 lines
39 KiB
JSON

[
{
"function": {
"description": "Collect structured multiple-choice answers from the user. Use this tool only when you are blocked on a decision that is genuinely the user's to make: one you cannot resolve from the request, the code, or sensible defaults.\n\nUsage notes:\n- Each question should have at least 2 options for the user to choose from\n- Users will always be able to select \"Other\" to provide custom text input\n- Use allow_multiple: true to allow multiple answers to be selected for a question\n- If you recommend a specific option, make that the first option in the list and add \"(Recommended)\" at the end of the label\n\nPrefer this tool over listing options in your final response text (as letters, numbers, bullet points, etc).",
"name": "AskQuestion",
"parameters": {
"properties": {
"questions": {
"description": "Array of questions to present to the user (minimum 1 required)",
"items": {
"properties": {
"allow_multiple": {
"description": "If true, user can select multiple options. Defaults to false.",
"type": "boolean"
},
"id": {
"description": "Unique identifier for this question",
"type": "string"
},
"options": {
"description": "Array of answer options (minimum 2 required)",
"items": {
"properties": {
"id": {
"description": "Unique identifier for this option",
"type": "string"
},
"label": {
"description": "Display text for this option",
"type": "string"
}
},
"required": [
"id",
"label"
],
"type": "object"
},
"minItems": 2,
"type": "array"
},
"prompt": {
"description": "The question text to display to the user",
"type": "string"
}
},
"required": [
"id",
"prompt",
"options"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"title": {
"description": "Optional title for the questions form",
"type": "string"
}
},
"required": [
"questions"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Call an MCP tool by server identifier and tool name with arbitrary JSON arguments. IMPORTANT: Always read the tool's schema/descriptor BEFORE calling to ensure correct parameters.\n\nExample:\n{\n \"server\": \"my-mcp-server\",\n \"toolName\": \"search\",\n \"arguments\": { \"query\": \"example\", \"limit\": 10 }\n}",
"name": "CallMcpTool",
"parameters": {
"properties": {
"arguments": {
"description": "Arguments to pass to the MCP tool, as described in the tool descriptor.",
"type": "object"
},
"server": {
"description": "Identifier of the MCP server hosting the tool.",
"type": "string"
},
"toolName": {
"description": "Name of the MCP tool to invoke.",
"type": "string"
}
},
"required": [
"server",
"toolName"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Deletes a file at the specified path. The operation will fail gracefully if:\n - The file doesn't exist\n - The operation is rejected for security reasons\n - The file cannot be deleted",
"name": "Delete",
"parameters": {
"properties": {
"path": {
"description": "The absolute path of the file to delete",
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Reads a specific resource from an MCP server, identified by server name and resource URI. Optionally, set downloadPath (relative to the workspace) to save the resource to disk; when set, the resource will be downloaded and not returned to the model.",
"name": "FetchMcpResource",
"parameters": {
"properties": {
"downloadPath": {
"description": "Optional relative path in the workspace to save the resource to. When set, the resource is written to disk and is not returned to the model.",
"type": "string"
},
"server": {
"description": "The MCP server identifier",
"type": "string"
},
"uri": {
"description": "The resource URI to read",
"type": "string"
}
},
"required": [
"server",
"uri"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "\nTool to search for files matching a glob pattern\n\n- Works fast with codebases of any size\n- Returns matching file paths sorted by modification time\n- Use this tool when you need to find files by name patterns\n- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches that are potentially useful as a batch.\n",
"name": "Glob",
"parameters": {
"properties": {
"glob_pattern": {
"description": "The glob pattern to match files against.\nPatterns not starting with \"**/\" are automatically prepended with \"**/\" to enable recursive searching.\n\nExamples:\n\t- \"*.js\" (becomes \"**/*.js\") - find all .js files\n\t- \"**/node_modules/**\" - find all node_modules directories\n\t- \"**/test/**/test_*.ts\" - find all test_*.ts files in any test directory",
"type": "string"
},
"target_directory": {
"description": "Absolute path to directory to search for files in. If not provided, defaults to Cursor workspace root.",
"type": "string"
}
},
"required": [
"glob_pattern"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "A search tool built on ripgrep. Results are capped to several thousand output lines for responsiveness; when truncation occurs, the results report \"at least\" counts, but are otherwise accurate.",
"name": "Grep",
"parameters": {
"properties": {
"-A": {
"description": "Number of lines to show after each match (rg -A). Requires output_mode: \"content\", ignored otherwise.",
"type": "integer"
},
"-B": {
"description": "Number of lines to show before each match (rg -B). Requires output_mode: \"content\", ignored otherwise.",
"type": "integer"
},
"-C": {
"description": "Number of lines to show before and after each match (rg -C). Requires output_mode: \"content\", ignored otherwise.",
"type": "integer"
},
"-i": {
"description": "Case insensitive search (rg -i) Defaults to false",
"type": "boolean"
},
"glob": {
"description": "Glob pattern to filter files (e.g. \"*.js\", \"*.{ts,tsx}\") - maps to rg --glob",
"type": "string"
},
"head_limit": {
"description": "Limit output size. For \"content\" mode: limits total matches shown. For \"files_with_matches\" and \"count\" modes: limits number of files.",
"minimum": 0,
"type": "integer"
},
"multiline": {
"description": "Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false.",
"type": "boolean"
},
"offset": {
"description": "Skip first N entries. For \"content\" mode: skips first N matches. For \"files_with_matches\" and \"count\" modes: skips first N files. Use with head_limit for pagination.",
"minimum": 0,
"type": "integer"
},
"output_mode": {
"description": "Output mode: \"content\" shows matching lines (supports -A/-B/-C context, -n line numbers, head_limit), \"files_with_matches\" shows file paths (supports head_limit), \"count\" shows match counts (supports head_limit). Defaults to \"content\".",
"enum": [
"content",
"files_with_matches",
"count"
],
"type": "string"
},
"path": {
"description": "File or directory to search in (rg pattern -- PATH). Defaults to Cursor workspace root.",
"type": "string"
},
"pattern": {
"description": "The regular expression pattern to search for in file contents",
"type": "string"
},
"type": {
"description": "File type to search (rg --type). Common types: js, py, rust, go, java, etc. More efficient than include for standard file types.",
"type": "string"
}
},
"required": [
"pattern"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Reads a file from the local filesystem. You can access any file directly by using this tool.\nIf the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.\n\nUsage:\n- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters\n- Lines in the output are numbered starting at 1, using following format: LINE_NUMBER|LINE_CONTENT\n- You have the capability to call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful.\n- If you read a file that exists but has empty contents you will receive 'File is empty.'\n\nImage Support:\n- This tool can also read image files when called with the appropriate path.\n- Supported image formats: jpeg/jpg, png, gif, webp.\n\nPDF Support:\n- PDF files are converted into text content automatically (subject to the same character limits as other files).",
"name": "Read",
"parameters": {
"properties": {
"limit": {
"description": "The number of lines to read. Only provide if the file is too large to read at once.",
"type": "integer"
},
"offset": {
"description": "The line number to start reading from. Positive values are 1-indexed from the start of the file. Negative values count backwards from the end (e.g. -1 is the last line). Only provide if the file is too large to read at once.",
"type": "integer"
},
"path": {
"description": "The absolute path of the file to read.",
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Lists files and directories under a directory path.\n\nUse this tool when you need directory structure, especially top-level project layout or immediate children of a folder. Do not use Glob(\"*\") or recursive Glob patterns to list a directory; use Ls instead.\n\nYou may provide ignore globs for large or irrelevant directories such as .git, node_modules, dist, build, .cursor-local-assistant-v2/history, or logs.",
"name": "Ls",
"parameters": {
"properties": {
"ignore": {
"description": "Optional ignore globs for directories or files that should be skipped while listing.",
"items": {
"type": "string"
},
"type": "array"
},
"path": {
"description": "The absolute path of the directory to list.",
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Read and display linter errors from the current workspace. You can provide paths to specific files or directories, or omit the argument to get diagnostics for all files.",
"name": "ReadLints",
"parameters": {
"properties": {
"paths": {
"description": "Optional. An array of paths to files or directories to read linter errors for. You can use either relative paths in the workspace or absolute paths. If provided, returns diagnostics for the specified files/directories only. If not provided, returns diagnostics for all files in the workspace.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Executes a given command in a shell session, waiting for output for `block_until_ms` millis.\nYou can monitor commands by configuring `notify_on_output`. You will be notified at the end of your turn whenever stdout/stderr output matches the regex `pattern`. Output redirected only to a file will not trigger it. Configure a 5-or-fewer-word `reason` explaining what you are watching for, and optionally configure `debounce_ms`.",
"name": "Shell",
"parameters": {
"properties": {
"block_until_ms": {
"description": "How long to block and wait for the command to complete before moving it to background (in milliseconds). Defaults to 30000ms (30 seconds). Set to 0 to immediately run the command in the background. The timer includes the shell startup time.",
"type": "number"
},
"command": {
"description": "The command to execute",
"type": "string"
},
"description": {
"description": "Clear, concise description of what this command does in 5-10 words",
"type": "string"
},
"working_directory": {
"description": "The absolute path to the working directory to execute the command in (defaults to current directory)",
"type": "string"
},
"notify_on_output": {
"description": "Optional watcher for backgrounded command output. You will be notified at the end of your turn whenever output matches the regex pattern. Use stable sentinel lines and simple anchored regexes; do not match all output. Completion notifications are separate and do not require this field.",
"properties": {
"pattern": {
"description": "Regex pattern to match against command output.",
"type": "string"
},
"reason": {
"description": "Five or fewer words describing what you are watching for. The UI prefixes it as Monitored `reason`.",
"type": "string"
},
"debounce_ms": {
"description": "Minimum milliseconds between notifications. Values below 5000ms are treated as 5000ms.",
"type": "number"
},
"notification_limit": {
"description": "Optional maximum number of output-match notifications for this command.",
"type": "number"
}
},
"required": [
"pattern",
"reason"
],
"type": "object"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
},
{
"type": "function",
"function": {
"name": "AwaitShell",
"description": "Check or poll a backgrounded shell job. Use this after Shell returns a shell_id. If shell_id is omitted, this waits for the requested block_until_ms duration and returns. Prefer not to poll reflexively; use it when the next step depends on the background job status or when doing a one-shot smoke check after block_until_ms: 0. Pattern matching checks accumulated stdout/stderr content, not terminal metadata.",
"parameters": {
"type": "object",
"properties": {
"shell_id": {
"type": "string",
"description": "Optional shell id to poll. Required when block_until_ms is 0."
},
"block_until_ms": {
"type": "number",
"description": "Max time to wait before returning, in milliseconds. Defaults to 30000ms. Set to 0 for a non-blocking status check."
},
"pattern": {
"type": "string",
"description": "Regex pattern to match against accumulated stdout/stderr content. Uses multiline matching."
}
}
}
}
},
{
"function": {
"description": "Writes literal characters to an existing background shell session. Use only when a previous Shell result returned a shell_id and the process is waiting for stdin. Include any needed newline in chars.",
"name": "WriteShellStdin",
"parameters": {
"properties": {
"chars": {
"description": "Literal characters to write to stdin. Include \\n when submitting a line.",
"type": "string"
},
"shell_id": {
"description": "The shell_id returned by a backgrounded Shell command.",
"type": "number"
}
},
"required": [
"shell_id",
"chars"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Requests that a running Shell tool call move to the background so the current agent turn can continue. Pass the original Shell tool_call_id, not the shell_id.",
"name": "ForceBackgroundShell",
"parameters": {
"properties": {
"tool_call_id": {
"description": "The original Shell tool call id to move to background.",
"type": "string"
}
},
"required": [
"tool_call_id"
],
"type": "object"
}
},
"type": "function"
},
{
"type": "function",
"function": {
"name": "PatchEdit",
"description": "Edit an existing text file by replacing exact text copied from the latest Read. Use this as the default tool for modifying existing source, markdown, JSON, YAML, config files, and short inline spans.\n\nUsage:\n- Read the relevant file first, then copy the exact current text into old_string.\n- path must be an absolute file path. Do not pass a relative path, workspace-relative path, or bare filename; this tool will not resolve or rewrite it.\n- old_string must exactly match the current file content; line endings are not normalized or treated equivalently during matching.\n- By default replace_all is false and old_string must match exactly one occurrence. If it matches multiple occurrences, the tool reports an error.\n- Set replace_all to true only when every exact occurrence should be replaced.\n- new_string may be empty to delete old_string.\n- Write is still only for creating new files or intentionally rewriting a whole file.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Absolute path to the file to modify. Required forms include /abs/path on macOS/Linux, C:\\abs\\path or C:/abs/path on Windows, or //server/share/path for UNC paths. Relative paths are invalid."
},
"old_string": {
"type": "string",
"description": "Exact text to replace. Must match the current file content exactly and must not be empty."
},
"new_string": {
"type": "string",
"description": "Replacement text. May be empty to delete old_string."
},
"replace_all": {
"type": "boolean",
"description": "Whether to replace all exact occurrences. Defaults to false."
}
},
"required": [
"path",
"old_string",
"new_string"
]
}
}
},
{
"function": {
"description": "Switch the interaction mode to better match the current task. Each mode is optimized for a specific type of work.\n\n## When to Switch Modes\n\nSwitch modes proactively when:\n1. **Task type changes** - User shifts from asking questions to requesting implementation, or vice versa\n2. **Complexity emerges** - What seemed simple reveals architectural decisions or multiple approaches\n3. **Debugging needed** - An error, bug, or unexpected behavior requires investigation\n4. **Planning needed** - The task is large, ambiguous, or has significant trade-offs to discuss\n5. **You're stuck** - Multiple attempts without progress suggest a different approach is needed\n\n## When NOT to Switch\n\nDo NOT switch modes for:\n- Simple, clear tasks that can be completed quickly in current mode\n- Mid-implementation when you're making good progress\n- Minor clarifying questions (just ask them)\n- Tasks where the current mode is working well\n\n## Available Modes\n\n### Agent Mode (cannot switch to this mode)\nDefault implementation mode with full access to all tools for making changes.\n\n### Plan Mode [switchable]\nRead-only collaborative mode for designing implementation approaches before coding.\n\n**Switch to Plan when:**\n- The task has multiple valid approaches with significant trade-offs\n- Architectural decisions are needed (e.g., \"Add caching\" - Redis vs in-memory vs file-based)\n- The task touches many files or systems (large refactors, migrations)\n- Requirements are unclear and you need to explore before understanding scope\n- You would otherwise ask multiple clarifying questions\n\n**Examples:**\n- User: \"Add user authentication\" → Switch to Plan (session vs JWT, storage, middleware decisions)\n- User: \"Refactor the database layer\" → Switch to Plan (large scope, architectural impact)\n- User: \"Make the app faster\" → Switch to Plan (need to profile, multiple optimization strategies)\n\n### Debug Mode (cannot switch to this mode)\nSystematic troubleshooting mode for investigating bugs, failures, and unexpected behavior with runtime evidence.\n\n### Ask Mode (cannot switch to this mode)\nRead-only mode for exploring code and answering questions without making changes.\n\n## Important Notes\n\n- **Be proactive**: Don't wait for the user to ask you to switch modes\n- **Explain briefly**: When switching, briefly explain why in your `explanation` parameter\n- **Don't over-switch**: If the current mode is working, stay in it\n- **User approval required**: Mode switches require user consent",
"name": "SwitchMode",
"parameters": {
"properties": {
"explanation": {
"description": "Optional explanation for why the mode switch is requested. This helps the user understand why you're switching modes.",
"type": "string"
},
"target_mode_id": {
"description": "The mode to switch to. Allowed values: 'plan'.",
"type": "string"
}
},
"required": [
"target_mode_id"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Launch a new agent that can autonomously handle complex, multi-step tasks.\n\nThe Task tool launches specialized subagents (subprocesses) that can autonomously handle complex tasks. Each subagent type has specific capabilities and available tools.\n\nWhen using the Task tool, you must specify the subagent_type parameter to select the type of agent to use.\n\nDefault behavior\n\nBy default, handle the user's request directly as the current agent, prioritizing direct tools such as Read, Glob, Grep, Shell, and MCP. A task being large, involving many steps, requiring codebase exploration, having an initially uncertain answer, or being theoretically parallelizable is not, by itself, a reason to call Task.\n\nYou may use Task only when at least one of the following conditions applies:\n- The user explicitly asks you to launch an agent, subagent, or worker, or explicitly requests parallel delegation.\n- There is a substantial, clearly bounded workflow that can be completed independently and whose delegation would materially help the current task.\n- The task genuinely requires capabilities provided only by a specialized subagent_type.\n\nDo not use Task when the current agent can complete the work with one or a small number of direct tool calls. Do not delegate the user's entire request to a subagent and simply return its result. The current agent remains responsible for understanding the user's intent, integrating the results, and producing the final response.\n\nConcurrency rules\n\n- Launch one to three subagents by default. The number should match the number of independent workflows that genuinely need delegation.\n- Launch multiple subagents concurrently only when the user explicitly requests parallel agents, or when there are two or three independent, substantial workflows.\n- Launch no more than three subagents in a single response, even if more parallel directions could be constructed.\n- Do not artificially split one investigation, one execution chain, or work that one agent can complete sequentially merely to create parallelism.\n- When multiple subagents are genuinely required, issue the Task calls together in the same message.\n\nExamples\n\n- User asks, \"Where is the ClientError class defined?\": use Grep or Glob directly; do not call Task.\n- User asks to read a known file: use Read directly; do not call Task.\n- User asks to search two or three specified files: use Read, Grep, or Glob directly; do not call Task.\n- User asks to run a query through a database API: call the appropriate MCP tool directly; do not call Task.\n- User broadly asks about the codebase structure: investigate with direct tools first; broad scope alone does not require delegation.\n- User explicitly asks, \"Launch two agents to investigate the client and server independently\": you may launch two clearly bounded Task calls concurrently.\n\nFor example:\n- User: \"Where is the ClientError class defined?\" Assistant: [Uses Grep directly because this is a targeted lookup for a specific class.]\n- User: \"Run this query using my database API.\" Assistant: [Calls the MCP tool directly because this is not a broad exploratory task.]\n- User: \"What is the codebase structure?\" Assistant: [Investigates with direct tools first. Uses an explore Task only if a substantial, independent exploration workflow becomes necessary.]\n\nWhen Task use is already justified and different areas of the codebase can be explored independently, launch the appropriate agents concurrently.\n\nWhen not to use Task\n\n- For simple, single-step, or few-step tasks that one agent can perform with parallel or sequential direct tool calls, call those tools directly.\n- For example:\n - To read a specific file path, use Read or Glob instead of Task so the match can be found more quickly.\n - To search for code in a specific file or a set of two or three files, use Read, Grep, or Glob instead of Task.\n - To find a specific class definition such as class Foo, use Grep or Glob instead of Task.\n\nUsage notes\n\n- Always include a short description of 3-5 words summarizing what the agent will do.\n- When multiple agents are justified, launch them concurrently to maximize performance by issuing multiple Task calls in one message. Never launch more than three agents in a single response.\n- When an agent finishes, it returns a message to you. Specify exactly what its final response should contain. The agent's result is not visible to the user; communicate a concise summary of relevant results to the user yourself.\n- Resume an agent by passing the agent ID from a previous call through the resume parameter. This sends a follow-up message after the agent completes its turn while preserving its existing context. Without resume, every invocation starts fresh, so provide a detailed task description containing all necessary context.\n- A Task subagent cannot access the user's messages or prior assistant steps. Provide all context it needs to complete the task autonomously.\n- Subagent output is generally trustworthy, but the current agent remains responsible for integrating and validating it as appropriate.\n- Tell the subagent exactly what to do because it does not know the user's intent or your prior tool calls, reasoning, or messages.\n- If a subagent type's description says it should be used proactively, apply that guidance only when the Task eligibility rules above are satisfied.\n- If the user explicitly asks to run subagents in parallel, send one message containing multiple Task calls. For example, launch a code-review subagent and a test-running subagent with two Task calls in the same message.\n- Do not delegate the full request to Task and return its result unchanged. Use direct tools for the work that belongs with the current agent.\n\nAvailable subagent types\n\n- generalPurpose: A general-purpose agent for researching complex questions, searching code, and executing multi-step tasks. Use it for a substantial, independently delegable workflow, including a code or keyword search whose match is unlikely to be found quickly with a small number of direct calls.\n- explore: A fast agent specialized in codebase exploration. Use it for a substantial, independently delegable exploration workflow involving file patterns such as src/components/**/*.tsx, keywords such as \"API endpoints,\" or codebase questions such as \"How do the API endpoints work?\" Specify the desired exploration level: \"quick\" for a basic search, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.\n- shell: A command-execution specialist for running bash commands, including Git operations and other terminal work.\n- browser-use: Performs browser-based testing and web automation. It can navigate pages, interact with elements, fill forms, and take screenshots. Use it to test web applications, verify UI changes, or perform other browser tasks when either: (1) the browser work should run in parallel with other justified work, or (2) a longer sequence of browser actions benefits from dedicated context. Use direct browser tools for a simple, single browser action. This subagent type is stateful: if a browser-use subagent already exists, invoking Task again with subagent_type set to browser-use resumes the most recently created subagent of this type, and the resume parameter is ignored.\n\nAvailable models\n\n- fast (cost: 1/10, intelligence: 5/10): An extremely fast, moderately capable model suited to tightly scoped changes. It is not suited to long-horizon tasks or deep investigation.\n\nWhen telling the user which model you selected for a Task or subagent, do not reveal internal model aliases. Use natural language such as \"a faster model,\" \"a more capable model,\" or \"the default model.\"\n\nPrefer fast for quick, straightforward tasks to minimize cost and latency. Select a different named model only for a specific reason, such as deep multi-step reasoning, exceptionally high code-quality requirements, multimodal understanding, or an explicit user request for a more capable model.",
"name": "Task",
"parameters": {
"properties": {
"attachments": {
"description": "Optional array of file paths to videos to pass to video-review subagents. Files are read and attached to the subagent's context. Supports video formats (mp4, webm) for Gemini models.",
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"description": "A short (3-5 word) description of the task",
"type": "string"
},
"model": {
"description": "Optional model to use for this agent. If not specified, inherits from parent. Prefer fast for quick, straightforward tasks to minimize cost and latency. Only select a different model when the task specifically benefits from it (e.g., deep reasoning, high-quality code review, multimodal input)",
"enum": [
"fast"
],
"type": "string"
},
"prompt": {
"description": "The task for the agent to perform",
"type": "string"
},
"readonly": {
"description": "If true, the subagent will run in readonly mode (\"Ask mode\") with restricted write operations and no MCP access.",
"type": "boolean"
},
"resume": {
"description": "Optional agent ID to resume from. If provided, sends a follow-up message to the agent when its turn is complete.",
"type": "string"
},
"subagent_type": {
"description": "Subagent type to use for this task. Must be one of: generalPurpose, explore, shell, browser-use.",
"enum": [
"generalPurpose",
"explore",
"shell",
"browser-use"
],
"type": "string"
}
},
"required": [
"description",
"prompt"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Use this tool to create and manage a structured task list for your current coding session.",
"name": "TodoWrite",
"parameters": {
"properties": {
"merge": {
"description": "Whether to merge the todos with the existing todos. If true, the todos will be merged into the existing todos based on the id field. Use true for normal incremental updates, marking items complete, adding follow-ups, or changing the current in-progress item. If false, the new todos replace the entire list and must include every existing todo id once a list already exists.",
"type": "boolean"
},
"todos": {
"description": "Array of TODO items to update or create",
"items": {
"properties": {
"content": {
"description": "The description/content of the todo item. For merge=true updates, omit content when it is unchanged. New todos and merge=false replacements must include content.",
"type": "string"
},
"id": {
"description": "Unique identifier for the TODO item",
"type": "string"
},
"status": {
"description": "The current status of the TODO item. For merge=true updates, omit status when it is unchanged.",
"enum": [
"pending",
"in_progress",
"completed",
"cancelled"
],
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"todos",
"merge"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Fetch content from a specified URL and return its contents in a readable markdown format. Use this tool when you need to retrieve and analyze web content.",
"name": "WebFetch",
"parameters": {
"properties": {
"url": {
"description": "The URL to fetch. The content will be converted to a readable markdown format.",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Search web for real-time info on any topic; use for up-to-date facts not in training data, like current events or tech updates. Results include snippets and URLs.",
"name": "WebSearch",
"parameters": {
"properties": {
"explanation": {
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal.",
"type": "string"
},
"search_term": {
"description": "The search term to look up on the web. Be specific and include relevant keywords for better results. For technical queries, include version numbers or dates if relevant.",
"type": "string"
}
},
"required": [
"search_term"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Writes a file to the local filesystem.\n\nUsage:\n- path must be an absolute file path. Do not pass a relative path, workspace-relative path, or bare filename; this tool will not resolve or rewrite it.\n- This tool will overwrite the existing file if there is one at the provided path.\n- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.\n- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.",
"name": "Write",
"parameters": {
"properties": {
"contents": {
"description": "The contents to write to the file",
"type": "string"
},
"path": {
"description": "Absolute path to the file to modify. Required forms include /abs/path on macOS/Linux, C:\\abs\\path or C:/abs/path on Windows, or //server/share/path for UNC paths. Relative paths are invalid.",
"type": "string"
}
},
"required": [
"path",
"contents"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Generate or display an image using Cursor's native image result flow. Use this when the model already has generated image data to return. The image must be provided as raw base64 in image_data; the backend maps it to Cursor's native GenerateImageResult.success.image_data for display. Do not use markdown images, data URLs, or custom image/file URL protocols.",
"name": "GenerateImage",
"parameters": {
"properties": {
"description": {
"description": "Optional description of the generated image or the user's image generation intent.",
"type": "string"
},
"file_path": {
"description": "Optional target file path if the user explicitly requested one.",
"type": "string"
},
"image_data": {
"description": "Raw base64 image data for the generated image. Do not include a data:image/...;base64, prefix.",
"type": "string"
}
},
"type": "object"
}
},
"type": "function"
}
]