3.5 KiB
3.5 KiB
Available Tools
This document lists all the tools available in the AI coding assistant.
File Operations
- read_file: Read contents of a file from the local filesystem
- write: Write a file to the local filesystem (overwrites existing files)
- search_replace: Perform exact string replacements in files
- MultiEdit: Make multiple edits to a single file in one operation
- delete_file: Delete a file at the specified path
- list_dir: List files and directories in a given path
- glob_file_search: Search for files matching a glob pattern
Code Analysis and Search
- codebase_search: Semantic search tool to find code snippets relevant to queries
- grep: Powerful search tool built on ripgrep for exact symbol/string searches
- read_lints: Read and display linter errors from the current workspace
Terminal Operations
- run_terminal_cmd: Execute terminal commands on behalf of the user
Web and External Resources
- web_search: Search the web for real-time information about any topic
- fetch_rules: Fetch rules provided by the user to help with navigating the codebase
Task Management
- todo_write: Create and manage a structured task list for coding sessions
Notebook Operations
- edit_notebook: Edit Jupyter notebook cells (supports editing existing cells and creating new ones)
Git Operations
- fetch_pull_request: Fetch pull request information including title, description, and diff
Memory Management
- update_memory: Create, update, or delete memories in a persistent knowledge base
Diagram Creation
- create_diagram: Create Mermaid diagrams
Tool Usage Guidelines
File Operations
- Always prefer editing existing files rather than creating new ones
- Use MultiEdit for multiple changes to the same file
- Be careful with file paths - use relative paths when possible
Code Search
- Use codebase_search for semantic queries about functionality
- Use grep for exact string/symbol searches
- Check linter errors before and after making changes
Terminal Commands
- Commands run in the same shell session unless specified otherwise
- Use non-interactive flags for commands that require user input
- Background long-running processes appropriately
Task Management
- Use todo_write for complex multi-step tasks
- Update task status in real-time
- Only one task should be in_progress at a time
Memory Management
- Use update_memory for persistent information that should be remembered across sessions
- Include relevant context and metadata
- Use appropriate action types (create, update, delete)
Web Search
- Use for real-time information not available in training data
- Include version numbers or dates for technical queries
- Verify current facts and updates
Notebook Editing
- Use edit_notebook exclusively for Jupyter notebook operations
- Provide extensive context for unique identification
- Support both editing existing cells and creating new ones
Diagram Creation
- Use create_diagram for Mermaid diagrams
- Specify diagram type and content clearly
- Diagrams are rendered as SVG images
Git Operations
- Use fetch_pull_request to get detailed PR information
- Includes title, description, diff, and commit details
- Useful for understanding code changes and context
Best Practices
- Batch tool calls when possible for better performance
- Always read files before editing them
- Use appropriate tools for the task at hand
- Follow the user's coding rules and preferences
- Maintain code quality and avoid creating duplicate implementations