Some checks failed
CI / Code Quality (push) Failing after 17s
CI / Test (ubuntu-latest, 3.10) (push) Failing after 5s
CI / Test (ubuntu-latest, 3.11) (push) Failing after 4s
CI / Test (ubuntu-latest, 3.12) (push) Failing after 4s
CI / Test (ubuntu-latest, 3.13) (push) Failing after 4s
CI / Coverage (push) Failing after 25s
CI / Test (macos-latest, 3.13) (push) Has been cancelled
CI / Test (macos-latest, 3.10) (push) Has been cancelled
CI / Test (macos-latest, 3.11) (push) Has been cancelled
CI / Test (macos-latest, 3.12) (push) Has been cancelled
CI / Test (windows-latest, 3.10) (push) Has been cancelled
CI / Test (windows-latest, 3.11) (push) Has been cancelled
CI / Test (windows-latest, 3.12) (push) Has been cancelled
CI / Test (windows-latest, 3.13) (push) Has been cancelled
✨ Features: - 50+ development tools across 13 specialized categories - ⚡ Sneller Analytics: High-performance vectorized SQL (TB/s throughput) - 🎬 Asciinema Integration: Terminal recording and sharing - 🧠 AI-Powered Recommendations: Intelligent tool suggestions - 🔀 Advanced Git Integration: Smart operations with AI suggestions - 📁 Enhanced File Operations: Monitoring, bulk ops, backups - 🔍 Semantic Code Search: AST-based intelligent analysis - 🏗️ Development Workflow: Testing, linting, formatting - 🌐 Network & API Tools: HTTP client, mock servers - 📦 Archive & Compression: Multi-format operations - 🔬 Process Tracing: System call monitoring - 🌍 Environment Management: Virtual envs, dependencies 🎯 Ready for production with comprehensive documentation and MCP Inspector support!
5.8 KiB
5.8 KiB
LLM Tool Annotations Guide
Note: This project is prepared for FastMCP's new ToolAnnotations feature (available in main branch). Until that's released, this guide serves as reference for LLM clients.
Tool Safety Categories
🟢 SAFE - Read-Only Tools
These tools only read data and never modify files or system state:
diff_generate_diff- Compare files/directories, safe to run anytimegit_git_status- Check git repository statusgit_git_diff- View git changes and diffssearch_analyze_codebase- Analyze code metrics (LOC, complexity, dependencies)search_find_duplicates- Find duplicate files using hash comparisondev_run_tests- Execute tests (doesn't modify code)dev_lint_code- Check code quality with linters (when fix=False)trace_trace_process- Monitor process activity (read-only)trace_analyze_syscalls- Analyze system call tracestrace_process_monitor- Real-time process monitoringenv_environment_info- Get system/environment infoenv_process_tree- Show process hierarchyenhanced_search_code_enhanced- Advanced code searchutil_dependency_check- Analyze project dependencies
🟡 CAUTION - File Creation Tools
These tools create new files but don't modify existing ones:
diff_create_patch_file- Creates patch files from editsfile_file_backup- Creates backup copies of filesarchive_create_archive- Create compressed archivesutil_generate_documentation- Generate documentation files
🟠 WARNING - Potentially Destructive Tools
These tools can modify or create files/directories. Use with care:
file_watch_files- Monitors files (safe) but returns watch IDsnet_http_request- HTTP requests (read-only for GET, potentially destructive for POST/PUT/DELETE)net_api_mock_server- Start mock server (creates server process)archive_extract_archive- Extract archives (creates files/directories)env_manage_virtual_env- Create/manage Python environments
🔴 DESTRUCTIVE - Dangerous Tools
These tools modify existing files or system state. Always use dry_run=True first when available!
diff_apply_patch- Modifies files! Use dry_run=True firstgit_git_commit_prepare- Stages files for git commitfile_bulk_rename- Renames files! Use dry_run=True firstsearch_search_and_replace_batch- Modifies files! Use dry_run=True firstdev_format_code- Formats/modifies code filesenhanced_edit_block_enhanced- Advanced multi-file editingutil_project_template- Creates entire project structure
⛔ EXTREMELY DANGEROUS - Hidden Parameters
These tools have dangerous parameters hidden from LLM:
dev_lint_code- Hiddenfixparameter (can modify files)trace_trace_process- Hiddentargetparameter (security)enhanced_execute_command_enhanced- Hiddencommandparameter (can execute anything)
Tool Usage Guidelines for LLMs
Always Preview Before Modifying
For any destructive tool, ALWAYS:
- Use
dry_run=Truefirst to preview changes - Review the preview results with the user
- Only proceed with actual changes if user confirms
Safe Default Practices
- Start with read-only tools to understand the codebase
- Use
file_file_backupbefore making changes - Prefer
git_git_statusandgit_git_diffto understand changes - Use
search_analyze_codebaseto understand project structure
Error Handling
- All tools include comprehensive error handling
- Check for error messages in return values
- Many tools will gracefully skip missing files/directories
Progress Reporting
- Long-running tools report progress when possible
- Tools use Context logging for detailed operation tracking
Example Safe Workflow
# 1. Understand the project
await search_analyze_codebase(directory=".", include_metrics=["loc", "dependencies"])
# 2. Check git status
await git_git_status(repository_path=".")
# 3. Preview changes (if needed)
await search_search_and_replace_batch(
directory=".",
search_pattern="old_pattern",
replacement="new_pattern",
dry_run=True # ALWAYS preview first
)
# 4. Create backup before changes
await file_file_backup(file_paths=["important_file.py"])
# 5. Apply changes only after user confirmation
await search_search_and_replace_batch(
directory=".",
search_pattern="old_pattern",
replacement="new_pattern",
dry_run=False, # Only after preview and confirmation
backup=True
)
Tool Categories by Function
Development Workflow
- Testing:
dev_run_tests(safe) - Code Quality:
dev_lint_code(safe),dev_format_code(destructive) - Project Analysis:
search_analyze_codebase(safe)
Git Integration
- Status:
git_git_status(safe),git_git_diff(safe) - Staging:
git_git_commit_prepare(destructive - stages files)
File Operations
- Monitoring:
file_watch_files(safe) - Backup:
file_file_backup(safe - creates copies) - Rename:
file_bulk_rename(destructive - use dry_run first)
Search & Replace
- Analysis:
search_analyze_codebase(safe),search_find_duplicates(safe) - Modification:
search_search_and_replace_batch(destructive - use dry_run first)
Network & APIs
- HTTP:
net_http_request(depends on method) - Mock Server:
net_api_mock_server(creates process)
Archives
- Create:
archive_create_archive(safe - creates new files) - Extract:
archive_extract_archive(destructive - creates files)
System Monitoring
- Processes:
env_process_tree(safe),trace_process_monitor(safe) - Environment:
env_environment_info(safe) - Virtual Envs:
env_manage_virtual_env(destructive when creating)
This guide ensures LLMs can use the tools safely and effectively even before the official ToolAnnotations feature is available.