mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-10 03:07:06 +00:00
966 lines
70 KiB
JSON
966 lines
70 KiB
JSON
{
|
||
"user": "4206921",
|
||
"model": "gpt-5.2",
|
||
"input": [
|
||
{
|
||
"role": "system",
|
||
"content": "You are an AI coding agent, powered by GPT-5.2. You operate in Cursor.\n\nEach time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more. This information may or may not be relevant to the coding task, it is up for you to decide.\n\nYou are a highly autonomous agent. Please keep calling tools until the user's query is completely resolved, before ending your turn and yielding back to the user. ..."
|
||
},
|
||
{
|
||
"role": "user",
|
||
"content": "<user_info>\nOS Version: darwin 24.6.0\nCurrent Date: Friday Dec 26, 2025\nShell: /bin/zsh\nWorkspace Path: /Users/fungus/.cursor/worktrees/routstr-proxy/mzg\nTerminals folder: /Users/fungus/.cursor/projects/Users-fungus-dev-routstr-proxy/terminals\nNote: Prefer using absolute paths over relative paths as tool call args when possible.\n</user_info>\n\n<rules>\nThe rules section has a number of possible rules/memories/context that you should consider. In each subsection, we provide instructions about what information the subsection contains and how you should consider/follow the contents of the subsection.\n\n\n\n<user_rules description=\"These are rules set by the user that you should follow if appropriate.\">\n- You write the code on a top 0.1% expert level.\nWrite full type hinting on the function definitions.\nUse 3.11+ type syntax so lowercase dict, list, list[...], ... and not List[...], and use type | None instead of Optional[type].\nDo not write comments for code that is self explainatory. Never change any code that is not in the scope of the current problem. Other expert coders checking your code need to be and will be impressed otherwise you will be fired.\n- You write the code on a top 0.1% expert level.\nWrite full type hinting on the function definitions.\nUse 3.11+ type syntax so lowercase dict, list, list[...], ... and not List[...], and use type | None instead of Optional[type].\nDo not write comments for code that is self explainatory. Never change any code that is not in the scope of the current problem. Other expert coders checking your code need to be and will be impressed otherwise you will be fired.\n- You write the code on a top 0.1% expert level.\nWrite full type hinting on the function definitions.\nUse 3.11+ type syntax so lowercase dict, list, list[...], ... and not List[...], and use type | None instead of Optional[type].\nDo not write comments for code that is self explainatory. Never change any code that is not in the scope of the current problem. Other expert coders checking your code need to be and will be impressed otherwise you will be fired.\n</user_rules>\n\n</rules>\n\n\n<project_layout>\nBelow is a snapshot of the current workspace's file structure at the start of the conversation. This snapshot will NOT update during the conversation.\n\n/Users/fungus/.cursor/worktrees/routstr-proxy/mzg/\n - __pycache__/\n - alembic.ini\n - build-docs.sh\n - compose.override.yml\n - compose.testing.yml\n - compose.yml\n - CONTRIBUTING.md\n - dist/\n - routstr-0.1.0-py3-none-any.whl\n - routstr-0.1.0.tar.gz\n - Dockerfile\n - docs/\n - advanced/\n - custom-pricing.md\n - migrations.md\n - nostr.md\n - tor.md\n - api/\n - authentication.md\n - endpoints.md\n - errors.md\n - overview.md\n - contributing/\n - architecture.md\n - code-structure.md\n - setup.md\n - testing.md\n - getting-started/\n - configuration.md\n - docker.md\n - overview.md\n - quickstart.md\n - ui-configuration.md\n - index.md\n - requirements.txt\n - user-guide/\n - admin-dashboard.md\n - introduction.md\n - models-pricing.md\n - payment-flow.md\n - using-api.md\n - example.py\n - examples/\n - responses/\n - keys.db\n - keys.db-shm\n - keys.db-wal\n - LICENSE\n - logs/\n - app_2025-10-15.log\n - app_2025-10-20.log\n - app_2025-10-21.log\n - app_2025-10-22.log\n - app_2025-10-23.log\n - app_2025-10-24.log\n - app_2025-10-25.log\n - app_2025-10-26.log\n - app_2025-10-27.log\n - app_2025-10-29.log\n - app_2025-10-30.log\n - app_2025-11-01.log\n - app_2025-11-02.log\n - app_2025-11-03.log\n - app_2025-11-06.log\n - app_2025-11-11.log\n - app_2025-11-13.log\n - app_2025-11-14.log\n - app_2025-11-16.log\n - app_2025-11-17.log\n - app_2025-11-18.log\n - app_2025-11-20.log\n - app_2025-11-21.log\n - app_2025-11-23.log\n - app_2025-12-02.log\n - app_2025-12-03.log\n - app_2025-12-08.log\n - app_2025-12-09.log\n - app_2025-12-10.log\n - app_2025-12-11.log\n - app_2025-12-19.log\n - app_2025-12-20.log\n - app_2025-12-21.log\n - app_2025-12-22.log\n - app_2025-12-23.log\n - app_2025-12-24.log\n - app_2025-12-25.log\n - app_2025-12-26.log\n - Makefile\n - migrations/\n - __pycache__/\n - env.py\n - script.py.mako\n - versions/\n [13 files in subtree: 13 *.py]\n - mkdocs.yml\n - models.example.json\n - pyproject.toml\n - README.md\n - routstr/\n - __init__.py\n - __pycache__/\n - algorithm.py\n - auth.py\n - balance.py\n - core/\n - __init__.py\n - __pycache__/...\n - admin.py\n - db.py\n - exceptions.py\n - log_manager.py\n - logging.py\n - main.py\n - middleware.py\n - settings.py\n - discovery.py\n - lightning.py\n - nip91.py\n - payment/\n - __init__.py\n - __pycache__/...\n - cost_calculation.py\n - helpers.py\n - lnurl.py\n - models.py\n - price.py\n - proxy.py\n - upstream/\n [18 files in subtree: 18 *.py]\n - wallet.py\n - routstr.egg-info/\n - dependency_links.txt\n - PKG-INFO\n - requires.txt\n - SOURCES.txt\n - top_level.txt\n - scripts/\n - auto_update.sh\n - build-ui.sh\n - crontab.example\n - models_meta.py\n - testing-clients/\n - chat-completions-tester.html\n - models-dashboard.html\n - tests/\n - __pycache__/\n - integration/\n [24 files in subtree: 22 *.py, 1 *.md, 1 *.sh]\n - run_integration.py\n - unit/\n [9 files in subtree: 8 *.py, 1 *.md]\n - ui/\n - app/\n - balances/\n [1 file in subtree: 1 *.tsx]\n - dashboard/...\n - data.json\n - favicon.ico\n - globals.css\n - layout.tsx\n - login/\n [1 file in subtree: 1 *.tsx]\n - logs/\n [5 files in subtree: 4 *.tsx, 1 *.ts]\n - model/\n [1 file in subtree: 1 *.tsx]\n - page.tsx\n - providers/\n [1 file in subtree: 1 *.tsx]\n - providers.tsx\n - settings/\n [1 file in subtree: 1 *.tsx]\n - transactions/\n [1 file in subtree: 1 *.tsx]\n - unauthorized/\n [1 file in subtree: 1 *.tsx]\n - components/\n [81 files in subtree: 81 *.tsx]\n - components.json\n - Dockerfile\n - Dockerfile.build\n - eslint.config.mjs\n - hooks/\n - use-mobile.ts\n - lib/\n [28 files in subtree: 26 *.ts, 2 *.tsx]\n - next-env.d.ts\n - next.config.ts\n - node_modules/\n - out/...\n - package-lock.json\n - package.json\n - pnpm-lock.yaml\n - postcss.config.mjs\n - public/\n [6 files in subtree: 5 *.svg, 1 *.ico]\n - README.md\n - tsconfig.json\n - ui_out/\n - _next/...\n - 404/\n - index.html\n - 404.html\n - balances/...\n - favicon.ico\n - file.svg\n - globe.svg\n - icon.ico\n - index.html\n - index.txt\n - login/...\n - logs/...\n - model/...\n - next.svg\n - providers/...\n - settings/...\n - transactions/...\n - unauthorized/...\n - vercel.svg\n - window.svg\n - uv.lock\n\n\n\nNote: File extension counts do not include files ignored by .gitignore.</project_layout>"
|
||
},
|
||
{
|
||
"role": "user",
|
||
"content": "<additional_data>\nBelow are some potentially helpful/relevant pieces of information for figuring out how to respond:\n<open_and_recently_viewed_files>\nRecently viewed files (recent at the top, oldest at the bottom):\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/example.py (total lines: 38)\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/routstr/upstream/base.py (total lines: 1926)\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/routstr/core/main.py (total lines: 338)\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/routstr/upstream/helpers.py (total lines: 391)\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/routstr/proxy.py (total lines: 364)\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/routstr/payment/price.py (total lines: 159)\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/routstr/upstream/openrouter.py (total lines: 83)\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/routstr/core/admin.py (total lines: 3136)\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/ui/components/ModelSelector.tsx (total lines: 1465)\n\nFiles that are currently open and visible in the user's IDE:\n- /Users/fungus/.cursor/worktrees/routstr-proxy/mzg/example.py (currently focused file, cursor is on line 21, total lines: 38)\n- /Users/fungus/.cursor/projects/Users-fungus-dev-routstr-proxy/terminals/3.txt (total lines: 507)\n\nNote: these files may or may not be relevant to the current conversation. Use the read_file tool if you need to get the contents of some of them.\n</open_and_recently_viewed_files>\n</additional_data>\n\n<user_query>\ni got this when using gemini upstream, {\n \"error\": {\n \"message\": \"Upstream request failed\",\n \"type\": \"rate_limit_exceeded\",\n \"code\": 429\n },\n \"request_id\": \"301487bc-9546-4c33-9c50-ab033b4f745c\"\n}\n\nso this one upstream provider connected to my account has low rate limits, but is cheaper than openrouter, which also has the same model available. with our @routstr/algorithm.py it will prefer the cheaper upstream provider but then if the upstream request fails it should retry the same request to the secon best upstream provider. so we need to kind of more complex data structure that mapps models to the best upstream but also gives access to the second best, third best etc so it can be swapped in case of certain errors, we prob also need to store the initial request somehow and have some big try except case to handle this specific upstream error scenario\n</user_query>\n"
|
||
}
|
||
],
|
||
"tools": [
|
||
{
|
||
"type": "function",
|
||
"name": "codebase_search",
|
||
"description": "`codebase_search`: semantic search that finds code by meaning, not exact text\n\n### When to Use This Tool\n\nUse `codebase_search` when you need to:\n- Explore unfamiliar codebases\n- Ask \"how / where / what\" questions to understand behavior\n- Find code by meaning rather than exact text\n\n### When NOT to Use\n\nSkip `codebase_search` for:\n1. Exact text matches (use `grep`)\n2. Reading known files (use `read_file`)\n3. Simple symbol lookups (use `grep`)\n4. Find file by name (use `file_search`)\n\n### Examples\n\n<example>\n Query: \"Where is interface MyInterface implemented in the frontend?\"\n<reasoning>\n Good: Complete question asking about implementation location with specific context (frontend).\n</reasoning>\n</example>\n\n<example>\n Query: \"Where do we encrypt user passwords before saving?\"\n<reasoning>\n Good: Clear question about a specific process with context about when it happens.\n</reasoning>\n</example>\n\n<example>\n Query: \"MyInterface frontend\"\n<reasoning>\n BAD: Too vague; use a specific question instead. This would be better as \"Where is MyInterface used in the frontend?\"\n</reasoning>\n</example>\n\n<example>\n Query: \"AuthService\"\n<reasoning>\n BAD: Single word searches should use `grep` for exact text matching instead.\n</reasoning>\n</example>\n\n<example>\n Query: \"What is AuthService? How does AuthService work?\"\n<reasoning>\n BAD: Combines two separate queries. A single semantic search is not good at looking for multiple things in parallel. Split into separate parallel searches: like \"What is AuthService?\" and \"How does AuthService work?\"\n</reasoning>\n</example>\n\n### Target Directories\n\n- Provide ONE directory or file path; [] searches the whole repo. No globs or wildcards.\n Good:\n - [\"backend/api/\"] - focus directory\n - [\"src/components/Button.tsx\"] - single file\n - [] - search everywhere when unsure\n BAD:\n - [\"frontend/\", \"backend/\"] - multiple paths\n - [\"src/**/utils/**\"] - globs\n - [\"*.ts\"] or [\"**/*\"] - wildcard paths\n\n### Search Strategy\n\n1. Start with exploratory queries - semantic search is powerful and often finds relevant context in one go. Begin broad with [] if you're not sure where relevant code is.\n2. Review results; if a directory or file stands out, rerun with that as the target.\n3. Break large questions into smaller ones (e.g. auth roles vs session storage).\n4. For big files (>1K lines) run `codebase_search`, or `grep` if you know the exact symbols you're looking for, scoped to that file instead of reading the entire file.\n\n<example>\n Step 1: { \"query\": \"How does user authentication work?\", \"target_directories\": [], \"explanation\": \"Find auth flow\" }\n Step 2: Suppose results point to backend/auth/ → rerun:\n { \"query\": \"Where are user roles checked?\", \"target_directories\": [\"backend/auth/\"], \"explanation\": \"Find role logic\" }\n<reasoning>\n Good strategy: Start broad to understand overall system, then narrow down to specific areas based on initial results.\n</reasoning>\n</example>\n\n<example>\n Query: \"How are websocket connections handled?\"\n Target: [\"backend/services/realtime.ts\"]\n<reasoning>\n Good: We know the answer is in this specific file, but the file is too large to read entirely, so we use semantic search to find the relevant parts.\n</reasoning>\n</example>\n\n### Usage\n- When full chunk contents are provided, avoid re-reading the exact same chunk contents using the read_file tool.\n- Sometimes, just the chunk signatures and not the full chunks will be shown. Chunk signatures are usually Class or Function signatures that chunks are contained in. Use the read_file or grep tools to explore these chunks or files if you think they might be relevant.\n- When reading chunks that weren't provided as full chunks (e.g. only as line ranges or signatures), you'll sometimes want to expand the chunk ranges to include the start of the file to see imports, expand the range to include lines from the signature, or expand the range to read multiple chunks from a file at once.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"explanation": {
|
||
"type": "string",
|
||
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal."
|
||
},
|
||
"query": {
|
||
"type": "string",
|
||
"description": "A complete question about what you want to understand. Ask as if talking to a colleague: 'How does X work?', 'What happens when Y?', 'Where is Z handled?'"
|
||
},
|
||
"target_directories": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"description": "Prefix directory paths to limit search scope (single directory only, no glob patterns)"
|
||
}
|
||
},
|
||
"required": [
|
||
"explanation",
|
||
"query",
|
||
"target_directories"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "run_terminal_cmd",
|
||
"description": "PROPOSE a command to run on behalf of the user.\nNote that the user may have to approve the command before it is executed.\nThe user may reject it if it is not to their liking, or may modify the command before approving it. If they do change it, take those changes into account.\nIn using these tools, adhere to the following guidelines:\n1. Before starting servers or long-running processes, list the terminals folder to check if they are already running in existing terminals.\n2. Based on the contents of the conversation, you will be told if you are in the same shell as a previous step or a different shell.\n3. If in a new shell, you should `cd` to the appropriate directory and do necessary setup in addition to running the command. By default, the shell will initialize in the project root.\n4. If in the same shell, LOOK IN CHAT HISTORY for your current working directory. The environment also persists (e.g. exported env vars, venv/nvm activations).\n5. For ANY commands that would require user interaction, ASSUME THE USER IS NOT AVAILABLE TO INTERACT and PASS THE NON-INTERACTIVE FLAGS (e.g. --yes for npx).\n6. For commands that are long running/expected to run indefinitely until interruption, please run them in the background. To run jobs in the background, set `is_background` to true rather than changing the details of the command.\n\nBy default, your commands will run in a sandbox. The sandbox allows most writes to the workspace and reads to the rest of the filesystem. Network access, modifications to git state and modifications to ignored files are disallowed. Reads to git state are allowed. Some other syscalls are also disallowed like access to USB devices. Syscalls that attempt forbidden operations will fail and not all programs will surface these errors in a useful way.\nFiles that are ignored by .gitignore or .cursorignore are not accessible to the command. If you need to access a file that is ignored, you will need to request \"all\" permissions to disable sandboxing.\nThe required_permissions argument is used to request additional permissions. If you know you will need a permission, request it. Requesting permissions will slow down the command execution as it will ask the user for approval. Do not hesitate to request permissions if you are certain you need them.\nThe following permissions are supported:\n- network: Grants broad network access to run a server or contact the internet. Needed for package installs, API calls, hosting servers and fetching dependencies.\n- git_write: Allows write access to .git directories. Required if you want to make commits, checkout a branch or otherwise modify any git state. Not required for read-only commands like git status or git log.\n- all: Disables the sandbox entirely. If all is requested the command will not run in a sandbox and the sandbox cannot impact the result of the command.\nOnly request permissions when they are actually needed for the command to succeed. Most file operations, reading, and local builds work fine in the default sandbox.\nMake sure to request git_write permissions if you need to make changes to the git repository, including staging, unstaging or committing.\nIf you think a command failed due to sandbox restrictions, run the command again with the required_permissions argument to request what you need. Don't change the code, just request the permissions.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"command": {
|
||
"type": "string",
|
||
"description": "The terminal command to execute"
|
||
},
|
||
"is_background": {
|
||
"type": "boolean",
|
||
"description": "Whether the command should be run in the background"
|
||
},
|
||
"explanation": {
|
||
"type": "string",
|
||
"description": "One sentence explanation as to why this command needs to be run and how it contributes to the goal."
|
||
},
|
||
"required_permissions": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string",
|
||
"enum": [
|
||
"git_write",
|
||
"network",
|
||
"all"
|
||
]
|
||
},
|
||
"description": "Optional list of permissions to request if the command needs them (git_write, network, all)."
|
||
}
|
||
},
|
||
"required": [
|
||
"command",
|
||
"is_background"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "grep",
|
||
"description": "A powerful search tool built on ripgrep\n\nUsage:\n- Prefer grep for exact symbol/string searches. Whenever possible, use this instead of terminal grep/rg. This tool is faster and respects .gitignore/.cursorignore.\n- Supports full regex syntax, e.g. \"log.*Error\", \"function\\s+\\w+\". Ensure you escape special chars to get exact matches, e.g. \"functionCall\\(\"\n- Avoid overly broad glob patterns (e.g., '--glob *') as they bypass .gitignore rules and may be slow\n- Only use 'type' (or 'glob' for file types) when certain of the file type needed. Note: import paths may not match source file types (.js vs .ts)\n- Output modes: \"content\" shows matching lines (default), \"files_with_matches\" shows only file paths, \"count\" shows match counts per file\n- Pattern syntax: Uses ripgrep (not grep) - literal braces need escaping (e.g. use interface\\{\\} to find interface{} in Go code)\n- Multiline matching: By default patterns match within single lines only. For cross-line patterns like struct \\{[\\s\\S]*?field, use multiline: true\n- Results are capped for responsiveness; truncated results show \"at least\" counts.\n- Content output follows ripgrep format: '-' for context lines, ':' for match lines, and all lines grouped by file.\n- Unsaved or out of workspace active editors are also searched and show \"(unsaved)\" or \"(out of workspace)\". Use absolute paths to read/edit these files.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"pattern": {
|
||
"type": "string",
|
||
"description": "The regular expression pattern to search for in file contents (rg --regexp)"
|
||
},
|
||
"path": {
|
||
"type": "string",
|
||
"description": "File or directory to search in (rg pattern -- PATH). Defaults to Cursor workspace roots."
|
||
},
|
||
"glob": {
|
||
"type": "string",
|
||
"description": "Glob pattern (rg --glob GLOB -- PATH) to filter files (e.g. \"*.js\", \"*.{ts,tsx}\")."
|
||
},
|
||
"output_mode": {
|
||
"type": "string",
|
||
"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"
|
||
]
|
||
},
|
||
"-B": {
|
||
"type": "number",
|
||
"description": "Number of lines to show before each match (rg -B). Requires output_mode: \"content\", ignored otherwise."
|
||
},
|
||
"-A": {
|
||
"type": "number",
|
||
"description": "Number of lines to show after each match (rg -A). Requires output_mode: \"content\", ignored otherwise."
|
||
},
|
||
"-C": {
|
||
"type": "number",
|
||
"description": "Number of lines to show before and after each match (rg -C). Requires output_mode: \"content\", ignored otherwise."
|
||
},
|
||
"-i": {
|
||
"type": "boolean",
|
||
"description": "Case insensitive search (rg -i) Defaults to false"
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"description": "File type to search (rg --type). Common types: js, py, rust, go, java, etc. More efficient than glob for standard file types."
|
||
},
|
||
"head_limit": {
|
||
"type": "number",
|
||
"description": "Limit output to first N lines/entries, equivalent to \"| head -N\". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). When unspecified, shows all ripgrep results."
|
||
},
|
||
"multiline": {
|
||
"type": "boolean",
|
||
"description": "Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false."
|
||
}
|
||
},
|
||
"required": [
|
||
"pattern"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "delete_file",
|
||
"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",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"target_file": {
|
||
"type": "string",
|
||
"description": "The path of the file to delete, relative to the workspace root."
|
||
},
|
||
"explanation": {
|
||
"type": "string",
|
||
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal."
|
||
}
|
||
},
|
||
"required": [
|
||
"target_file"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "web_search",
|
||
"description": "Search the web for real-time information about any topic. Use this tool when you need up-to-date information that might not be available in your training data, or when you need to verify current facts. The search results will include relevant snippets and URLs from web pages. This is particularly useful for questions about current events, technology updates, or any topic that requires recent information.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"required": [
|
||
"search_term"
|
||
],
|
||
"properties": {
|
||
"search_term": {
|
||
"type": "string",
|
||
"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."
|
||
},
|
||
"explanation": {
|
||
"type": "string",
|
||
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal."
|
||
}
|
||
}
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "update_memory",
|
||
"description": "Creates, updates, or deletes a memory in a persistent knowledge base for future reference by the AI.\nIf the user augments an existing memory, you MUST use this tool with the action 'update'.\nIf the user contradicts an existing memory, it is critical that you use this tool with the action 'delete', not 'update', or 'create'.\nTo update or delete an existing memory, you MUST provide the existing_knowledge_id parameter.\nIf the user asks to remember something, for something to be saved, or to create a memory, you MUST use this tool with the action 'create'.\nUnless the user explicitly asks to remember or save something, DO NOT call this tool with the action 'create'.\n",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"title": {
|
||
"type": "string",
|
||
"description": "The title of the memory to be stored. This can be used to look up and retrieve the memory later. This should be a short title that captures the essence of the memory. Required for 'create' and 'update' actions."
|
||
},
|
||
"knowledge_to_store": {
|
||
"type": "string",
|
||
"description": "The specific memory to be stored. It should be no more than a paragraph in length. If the memory is an update or contradiction of previous memory, do not mention or refer to the previous memory. Required for 'create' and 'update' actions."
|
||
},
|
||
"action": {
|
||
"type": "string",
|
||
"enum": [
|
||
"create",
|
||
"update",
|
||
"delete"
|
||
],
|
||
"description": "The action to perform on the knowledge base. Defaults to 'create' if not provided for backwards compatibility."
|
||
},
|
||
"existing_knowledge_id": {
|
||
"type": "string",
|
||
"description": "Required if action is 'update' or 'delete'. The ID of existing memory to update instead of creating new memory."
|
||
}
|
||
},
|
||
"required": []
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "read_lints",
|
||
"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.\n\n- If a file path is provided, returns diagnostics for that file only\n- If a directory path is provided, returns diagnostics for all files within that directory\n- If no path is provided, returns diagnostics for all files in the workspace\n- This tool can return linter errors that were already present before your edits, so avoid calling it with a very wide scope of files\n- NEVER call this tool on a file unless you've edited it or are about to edit it",
|
||
"parameters": {
|
||
"type": "object",
|
||
"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.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"required": []
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "edit_notebook",
|
||
"description": "Use this tool to edit a jupyter notebook cell. Use ONLY this tool to edit notebooks.\n\nThis tool supports editing existing cells and creating new cells:\n\t- If you need to edit an existing cell, set 'is_new_cell' to false and provide the 'old_string' and 'new_string'.\n\t\t-- The tool will replace ONE occurrence of 'old_string' with 'new_string' in the specified cell.\n\t- If you need to create a new cell, set 'is_new_cell' to true and provide the 'new_string' (and keep 'old_string' empty).\n\t- It's critical that you set the 'is_new_cell' flag correctly!\n\t- This tool does NOT support cell deletion, but you can delete the content of a cell by passing an empty string as the 'new_string'.\n\nOther requirements:\n\t- Cell indices are 0-based.\n\t- 'old_string' and 'new_string' should be a valid cell content, i.e. WITHOUT any JSON syntax that notebook files use under the hood.\n\t- The old_string MUST uniquely identify the specific instance you want to change. This means:\n\t\t-- Include AT LEAST 3-5 lines of context BEFORE the change point\n\t\t-- Include AT LEAST 3-5 lines of context AFTER the change point\n\t- This tool can only change ONE instance at a time. If you need to change multiple instances:\n\t\t-- Make separate calls to this tool for each instance\n\t\t-- Each call must uniquely identify its specific instance using extensive context\n\t- This tool might save markdown cells as \"raw\" cells. Don't try to change it, it's fine. We need it to properly display the diff.\n\t- If you need to create a new notebook, just set 'is_new_cell' to true and cell_idx to 0.\n\t- ALWAYS generate arguments in the following order: target_notebook, cell_idx, is_new_cell, cell_language, old_string, new_string.\n\t- Prefer editing existing cells over creating new ones!\n\t- ALWAYS provide ALL required arguments (including BOTH old_string and new_string). NEVER call this tool without providing 'new_string'.\n",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"target_notebook": {
|
||
"type": "string",
|
||
"description": "The path to the notebook file you want to edit. You can use either a relative path in the workspace or an absolute path. If an absolute path is provided, it will be preserved as is."
|
||
},
|
||
"cell_idx": {
|
||
"type": "number",
|
||
"description": "The index of the cell to edit (0-based)"
|
||
},
|
||
"is_new_cell": {
|
||
"type": "boolean",
|
||
"description": "If true, a new cell will be created at the specified cell index. If false, the cell at the specified cell index will be edited."
|
||
},
|
||
"cell_language": {
|
||
"type": "string",
|
||
"description": "The language of the cell to edit. Should be STRICTLY one of these: 'python', 'markdown', 'javascript', 'typescript', 'r', 'sql', 'shell', 'raw' or 'other'."
|
||
},
|
||
"old_string": {
|
||
"type": "string",
|
||
"description": "The text to replace (must be unique within the cell, and must match the cell contents exactly, including all whitespace and indentation)."
|
||
},
|
||
"new_string": {
|
||
"type": "string",
|
||
"description": "The edited text to replace the old_string or the content for the new cell."
|
||
}
|
||
},
|
||
"required": [
|
||
"target_notebook",
|
||
"cell_idx",
|
||
"is_new_cell",
|
||
"cell_language",
|
||
"old_string",
|
||
"new_string"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "todo_write",
|
||
"description": "Use this tool to create and manage a structured list of implementation tasks for your current coding session. This helps track progress, organize complex tasks, and demonstrate thoroughness.\n\nNote: Other than when first creating todos, don't tell the user you're updating todos, just do it.\n\n### When to Use This Tool\n\nUse proactively for:\n1. Multi-step tasks (2+ distinct steps)\n2. Non-trivial tasks requiring careful planning\n3. User explicitly requests todo list\n4. User provides multiple tasks (numbered/comma-separated)\n5. After receiving new instructions - capture requirements as todos (use merge=false to add new ones)\n6. After completing tasks - mark complete with merge=true and add follow-ups\n7. When starting new tasks - mark as in_progress (ideally only one at a time)\n\n### When NOT to Use\n\nSkip for:\n1. Single, straightforward tasks\n2. Trivial tasks with no organizational benefit\n3. Tasks completable in < 3 trivial steps\n4. Purely conversational/informational/read-only requests\n5. Todo items should NOT include operational actions done in service of higher-level tasks.\n\n### Tasks NOT track in todos\n\n- Todo lists are not meant to track read-only tasks or hypothetical tasks (\"fix errors if tests fail\").\n- Todo items should NOT include operational actions done in service of higher-level tasks.\n- NEVER INCLUDE THESE IN TODOS unless the user specified these tasks: linting; testing; searching or examining the codebase; communicating with the user.\n\n### Examples\n\n<example>\n <user>Add dark mode toggle to settings</user>\n <assistant>\n [Creates todo list:]\n 1. Add state management [in_progress]\n 2. Implement styles\n 3. Create toggle component\n 4. Update components\n [Immediately begins working on todo 1 in the same tool call batch]\n <rationale>Multi-step feature.</rationale>\n </assistant>\n</example>\n\n<example>\n <user>Run the build and fix any type errors</user>\n <assistant>\n [runs the build, finds 10 type errors]\n [use the `todo_write` tool to write 10 items to the todo list, one for each type error]\n [marks the first todo as in_progress]\n [fixes the first item in the todo list]\n [marks the first todo item as completed and moves on to the second item]\n [...]\n </assistant>\n <rationale>At first the assistant doesn't use todos because building is one step. Once there are errors, requiring multiple steps, the assistant uses todos to ensure all 10 errors are fixed.</rationale>\n</example>\n\n<example>\n <user>Optimize my React app - it's rendering slowly.</user>\n <assistant>\n [Analyzes codebase, identifies issues]\n [Creates todo list: 1) Memoization, 2) Virtualization, 3) Image optimization, 4) Fix state loops, 5) Code splitting]\n </assistant>\n<rationale>\n Performance optimization requires multiple steps across different components.\n</rationale>\n</example>\n\n### Examples of When NOT to Use the Todo List\n\n<example>\n <user>What does git status do?</user>\n <assistant>\n Shows current state of working directory and staging area...\n </assistant>\n\n<rationale>\n Informational request with no coding task to complete.\n</rationale>\n</example>\n\n<example>\n <user>Add comment to calculateTotal function.</user>\n <assistant>\n *Uses edit tool to add comment*\n </assistant>\n<rationale>\n Single straightforward task in one location.\n</rationale>\n</example>\n\n<example>\n <user>Run npm install for me.</user>\n <assistant>\n *Executes npm install* Command completed successfully...\n </assistant>\n<rationale>\n Single command execution with immediate results.\n</rationale>\n</example>\n\n### Task States and Management\n\n1. **Task States:**\n - pending: Not yet started\n - in_progress: Currently working on\n - completed: Finished successfully\n - cancelled: No longer needed\n\n2. **Task Management:**\n - Update status in real-time\n - Mark complete IMMEDIATELY after finishing\n - Only ONE task in_progress at a time\n - Complete current tasks before starting new ones\n - Cancel tasks that are no longer needed immediately\n\n3. **Task Breakdown:**\n - Create specific, actionable items\n - Break complex tasks into manageable steps\n - Use clear, descriptive names\n\n4. **Parallel Todo Writes:**\n - Prefer creating the first todo as in_progress\n - Start working on todos by using tool calls in the same tool call batch as the todo write\n - Batch todo updates with other tool calls for better latency and lower costs for the user\n\nWhen in doubt, use this tool. Proactive task management demonstrates attentiveness and ensures complete requirements.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"merge": {
|
||
"type": "boolean",
|
||
"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. You can leave unchanged properties undefined. If false, the new todos will replace the existing todos."
|
||
},
|
||
"todos": {
|
||
"type": "array",
|
||
"description": "Array of todo items to write to the workspace",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {
|
||
"type": "string",
|
||
"description": "The description/content of the todo item"
|
||
},
|
||
"status": {
|
||
"type": "string",
|
||
"enum": [
|
||
"pending",
|
||
"in_progress",
|
||
"completed",
|
||
"cancelled"
|
||
],
|
||
"description": "The current status of the todo item"
|
||
},
|
||
"id": {
|
||
"type": "string",
|
||
"description": "Unique identifier for the todo item"
|
||
}
|
||
},
|
||
"required": [
|
||
"content",
|
||
"status",
|
||
"id"
|
||
]
|
||
},
|
||
"minItems": 2
|
||
}
|
||
},
|
||
"required": [
|
||
"merge",
|
||
"todos"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "custom",
|
||
"name": "apply_patch",
|
||
"description": "In this environment, you can run `<apply_patch_command>` with functions.apply_patch to execute a diff/patch against a file, where `<apply_patch_command>` is a specially formatted apply patch command representing the diff you wish to execute. Don't prefix the command with `bash -lc`, just directly call functions.apply_patch with it. A valid `<apply_patch_command>` looks like:\n*** Begin Patch\n[YOUR_PATCH]\n*** End Patch\n\nWhere [YOUR_PATCH] is the actual content of your patch, specified in the following V4A diff format.\n*** [ACTION] File: [path/to/file] -> ACTION can be one of Add or Update.\nFor each snippet of code that needs to be changed, repeat the following:\n[context_before]\n- [old_code] -> Precede the old code with a minus sign.\n+ [new_code] -> Precede the new, replacement code with a plus sign.\n[context_after]\nFor instructions on [context_before] and [context_after]:\n- Use the @@ operator to indicate the class or function to which the snippet to be changed belongs, and optionally provide 1-3 unchanged context lines above and below the snippet to be changed for disambiguation. For instance, we might have:\n@@ class BaseClass\n[2 lines of pre-context]\n- [old_code]\n+ [new_code]\n[2 lines of post-context]\n- For additional disambiguation, you can use multiple nested `@@` statements to specify both class and function, to jump to the right context. For instance:\n@@ class BaseClass\n@@ \tdef method():\n[2 lines of pre-context]\n- [old_code]\n+ [new_code]\n[2 lines of post-context]\nWe do not use line numbers in this diff format, as the context is enough to uniquely identify code. File references can only be relative, never absolute.\n\nDo NOT include line number prefixes in the patch contents.\nDo NOT attempt to use any other method to apply a patch in the container, as they will not work. Only use `functions.apply_patch`.",
|
||
"format": {
|
||
"type": "grammar",
|
||
"definition": "start: begin_patch hunk end_patch\nbegin_patch: \"*** Begin Patch\" LF\nend_patch: \"*** End Patch\" LF?\n\nhunk: add_hunk | update_hunk\nadd_hunk: \"*** Add File: \" filename LF add_line+\nupdate_hunk: \"*** Update File: \" filename LF change?\n\nfilename: /(.+)/\nadd_line: \"+\" /(.*)/ LF -> line\n\nchange: (change_context | change_line)+ eof_line?\n\nchange_context: (\"@@\" | \"@@ \" /(.+)/) LF\nchange_line: (\"+\" | \"-\" | \" \") /(.*)/ LF\neof_line: \"*** End of File\" LF\n\n%import common.LF\n",
|
||
"syntax": "lark"
|
||
}
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "read_file",
|
||
"description": "\nReads 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: \"Lxxx:LINE_CONTENT\", e.g. \"L123: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\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.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"target_file": {
|
||
"type": "string",
|
||
"description": "The path of the file to read. You can use either a relative path in the workspace or an absolute path. If an absolute path is provided, it will be preserved as is."
|
||
},
|
||
"offset": {
|
||
"type": "integer",
|
||
"description": "The line number to start reading from. Only provide if the file is too large to read at once."
|
||
},
|
||
"limit": {
|
||
"type": "integer",
|
||
"description": "The number of lines to read. Only provide if the file is too large to read at once."
|
||
}
|
||
},
|
||
"required": [
|
||
"target_file"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "list_dir",
|
||
"description": "Lists files and directories in a given path.\nThe 'target_directory' parameter can be relative to the workspace root or absolute.\nYou can optionally provide an array of glob patterns to ignore with the \"ignore_globs\" parameter.\n\nOther details:\n- The result does not display dot-files and dot-directories.\n",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"target_directory": {
|
||
"type": "string",
|
||
"description": "Path to directory to list contents of."
|
||
},
|
||
"ignore_globs": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"description": "Optional array of glob patterns to ignore.\nAll patterns match anywhere in the target directory. Patterns not starting with \"**/\" are automatically prepended with \"**/\".\n\nExamples:\n\t- \"*.js\" (becomes \"**/*.js\") - ignore all .js files\n\t- \"**/node_modules/**\" - ignore all node_modules directories\n\t- \"**/test/**/test_*.ts\" - ignore all test_*.ts files in any test directory\n"
|
||
}
|
||
},
|
||
"required": [
|
||
"target_directory"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "glob_file_search",
|
||
"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",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"target_directory": {
|
||
"type": "string",
|
||
"description": "Path to directory to search for files in. If not provided, defaults to Cursor workspace roots."
|
||
},
|
||
"glob_pattern": {
|
||
"type": "string",
|
||
"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\n"
|
||
}
|
||
},
|
||
"required": [
|
||
"glob_pattern"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "list_mcp_resources",
|
||
"description": "List available resources from configured MCP servers. Each returned resource will include all standard MCP resource fields plus a 'server' field indicating which server the resource belongs to.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"server": {
|
||
"type": "string",
|
||
"description": "Optional server identifier to filter resources by. If not provided, resources from all servers will be returned."
|
||
}
|
||
},
|
||
"required": []
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "fetch_mcp_resource",
|
||
"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.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"server": {
|
||
"type": "string",
|
||
"description": "The MCP server identifier"
|
||
},
|
||
"uri": {
|
||
"type": "string",
|
||
"description": "The resource URI to read"
|
||
},
|
||
"downloadPath": {
|
||
"type": "string",
|
||
"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."
|
||
}
|
||
},
|
||
"required": [
|
||
"server",
|
||
"uri"
|
||
]
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_navigate",
|
||
"description": "Navigate to a URL",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"url": {
|
||
"type": "string",
|
||
"description": "The URL to navigate to"
|
||
}
|
||
},
|
||
"required": [
|
||
"url"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_navigate_back",
|
||
"description": "Go back to the previous page",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {},
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_resize",
|
||
"description": "Resize the browser window",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"width": {
|
||
"type": "number",
|
||
"description": "Width of the browser window"
|
||
},
|
||
"height": {
|
||
"type": "number",
|
||
"description": "Height of the browser window"
|
||
}
|
||
},
|
||
"required": [
|
||
"width",
|
||
"height"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_snapshot",
|
||
"description": "Capture accessibility snapshot of the current page. Use this to get element refs for interactions, not browser_take_screenshot.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {},
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_wait_for",
|
||
"description": "Wait for text to appear or disappear or a specified time to pass",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"time": {
|
||
"type": "number",
|
||
"description": "The time to wait in seconds"
|
||
},
|
||
"text": {
|
||
"type": "string",
|
||
"description": "The text to wait for"
|
||
},
|
||
"textGone": {
|
||
"type": "string",
|
||
"description": "The text to wait for to disappear"
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_press_key",
|
||
"description": "Press a key on the keyboard",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"key": {
|
||
"type": "string",
|
||
"description": "Name of the key to press or a character to generate, such as `ArrowLeft` or `a`"
|
||
}
|
||
},
|
||
"required": [
|
||
"key"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_console_messages",
|
||
"description": "Returns all console messages",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {},
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_network_requests",
|
||
"description": "Returns all network requests since loading the page",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {},
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_click",
|
||
"description": "Perform click on a web page",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"element": {
|
||
"type": "string",
|
||
"description": "Human-readable element description used to obtain permission to interact with the element"
|
||
},
|
||
"ref": {
|
||
"type": "string",
|
||
"description": "Exact target element reference from the page snapshot"
|
||
},
|
||
"doubleClick": {
|
||
"type": "boolean",
|
||
"description": "Whether to perform a double click instead of a single click"
|
||
},
|
||
"button": {
|
||
"type": "string",
|
||
"enum": [
|
||
"left",
|
||
"right",
|
||
"middle"
|
||
],
|
||
"description": "Button to click, defaults to left"
|
||
},
|
||
"modifiers": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string",
|
||
"enum": [
|
||
"Alt",
|
||
"Control",
|
||
"ControlOrMeta",
|
||
"Meta",
|
||
"Shift"
|
||
]
|
||
},
|
||
"description": "Modifier keys to press"
|
||
}
|
||
},
|
||
"required": [
|
||
"element",
|
||
"ref"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_hover",
|
||
"description": "Hover over element on page",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"element": {
|
||
"type": "string",
|
||
"description": "Human-readable element description used to obtain permission to interact with the element"
|
||
},
|
||
"ref": {
|
||
"type": "string",
|
||
"description": "Exact target element reference from the page snapshot"
|
||
}
|
||
},
|
||
"required": [
|
||
"element",
|
||
"ref"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_type",
|
||
"description": "Type text into editable element",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"element": {
|
||
"type": "string",
|
||
"description": "Human-readable element description used to obtain permission to interact with the element"
|
||
},
|
||
"ref": {
|
||
"type": "string",
|
||
"description": "Exact target element reference from the page snapshot"
|
||
},
|
||
"text": {
|
||
"type": "string",
|
||
"description": "Text to type into the element"
|
||
},
|
||
"submit": {
|
||
"type": "boolean",
|
||
"description": "Whether to submit entered text (press Enter after)"
|
||
},
|
||
"slowly": {
|
||
"type": "boolean",
|
||
"description": "Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once."
|
||
}
|
||
},
|
||
"required": [
|
||
"element",
|
||
"ref",
|
||
"text"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_select_option",
|
||
"description": "Select an option in a dropdown",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"element": {
|
||
"type": "string",
|
||
"description": "Human-readable element description used to obtain permission to interact with the element"
|
||
},
|
||
"ref": {
|
||
"type": "string",
|
||
"description": "Exact target element reference from the page snapshot"
|
||
},
|
||
"values": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"description": "Array of values to select in the dropdown. This can be a single value or multiple values."
|
||
}
|
||
},
|
||
"required": [
|
||
"element",
|
||
"ref",
|
||
"values"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_drag",
|
||
"description": "Perform drag and drop between two elements",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"startElement": {
|
||
"type": "string",
|
||
"description": "Human-readable source element description used to obtain the permission to interact with the element"
|
||
},
|
||
"startRef": {
|
||
"type": "string",
|
||
"description": "Exact source element reference from the page snapshot"
|
||
},
|
||
"endElement": {
|
||
"type": "string",
|
||
"description": "Human-readable target element description used to obtain the permission to interact with the element"
|
||
},
|
||
"endRef": {
|
||
"type": "string",
|
||
"description": "Exact target element reference from the page snapshot"
|
||
}
|
||
},
|
||
"required": [
|
||
"startElement",
|
||
"startRef",
|
||
"endElement",
|
||
"endRef"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_evaluate",
|
||
"description": "Evaluate JavaScript expression on page or element",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"function": {
|
||
"type": "string",
|
||
"description": "() => { /* code */ } or (element) => { /* code */ } when element/ref is provided"
|
||
},
|
||
"element": {
|
||
"type": "string",
|
||
"description": "Description of the element, if evaluating on an element"
|
||
},
|
||
"ref": {
|
||
"type": "string",
|
||
"description": "CSS selector to find element, if evaluating on an element"
|
||
}
|
||
},
|
||
"required": [
|
||
"function"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_fill_form",
|
||
"description": "Fill multiple form fields",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"fields": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string",
|
||
"description": "Description of the field"
|
||
},
|
||
"ref": {
|
||
"type": "string",
|
||
"description": "CSS selector for the field"
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"enum": [
|
||
"textbox",
|
||
"checkbox",
|
||
"radio",
|
||
"combobox",
|
||
"slider"
|
||
],
|
||
"description": "Type of the field"
|
||
},
|
||
"value": {
|
||
"type": "string",
|
||
"description": "Value to fill in the field. If the field is a checkbox, the value should be `true` or `false`. If the field is a combobox, the value should be the text of the option."
|
||
}
|
||
},
|
||
"required": [
|
||
"name",
|
||
"ref",
|
||
"type",
|
||
"value"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"description": "Fields to fill in"
|
||
}
|
||
},
|
||
"required": [
|
||
"fields"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_handle_dialog",
|
||
"description": "Handle a dialog (alert, confirm, prompt)",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"accept": {
|
||
"type": "boolean",
|
||
"description": "Whether to accept the dialog."
|
||
},
|
||
"promptText": {
|
||
"type": "string",
|
||
"description": "The text of the prompt in case of a prompt dialog."
|
||
}
|
||
},
|
||
"required": [
|
||
"accept"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_take_screenshot",
|
||
"description": "Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"type": {
|
||
"type": "string",
|
||
"enum": [
|
||
"png",
|
||
"jpeg"
|
||
],
|
||
"default": "png",
|
||
"description": "Image format for the screenshot. Default is png."
|
||
},
|
||
"filename": {
|
||
"type": "string",
|
||
"description": "File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified."
|
||
},
|
||
"element": {
|
||
"type": "string",
|
||
"description": "Description of a specific element to screenshot (if omitted, screenshots the page)"
|
||
},
|
||
"ref": {
|
||
"type": "string",
|
||
"description": "CSS selector of a specific element to screenshot (if omitted, screenshots the page)"
|
||
},
|
||
"fullPage": {
|
||
"type": "boolean",
|
||
"description": "When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport."
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
},
|
||
{
|
||
"type": "function",
|
||
"name": "mcp_cursor-browser-extension_browser_tabs",
|
||
"description": "List, create, close, or select a browser tab.",
|
||
"parameters": {
|
||
"type": "object",
|
||
"properties": {
|
||
"action": {
|
||
"type": "string",
|
||
"enum": [
|
||
"list",
|
||
"new",
|
||
"close",
|
||
"select"
|
||
],
|
||
"description": "Operation to perform"
|
||
},
|
||
"index": {
|
||
"type": "number",
|
||
"description": "Tab index, used for close/select. If omitted for close, current tab is closed."
|
||
}
|
||
},
|
||
"required": [
|
||
"action"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"strict": false
|
||
}
|
||
],
|
||
"tool_choice": "auto",
|
||
"store": true,
|
||
"stream": true,
|
||
"prompt_cache_retention": "24h",
|
||
"metadata": {
|
||
"cursorRequestId": "4206921",
|
||
"cursorConversationId": "4206921"
|
||
},
|
||
"reasoning": {
|
||
"effort": "medium",
|
||
"summary": "auto"
|
||
},
|
||
"text": {
|
||
"verbosity": "low"
|
||
},
|
||
"stream_options": {
|
||
"include_usage": true
|
||
}
|
||
} |