Forked from crunch3r/ai-toolbox
~90 unique tools across 16 categories, fully integrated and ready for use.
All tools dynamically registered with category-level gating. All tools registered via direct SDK pattern (no gateway indirection).
| Feature | Description |
|---|---|
| ๐ File System | Read, write, search, and manage files with path validation & backup support |
| ๐ Web Research | Multi-engine search (DDG, Google, Bing) with automatic fallback |
| ๐ฅ๏ธ Browser Automation | Headless Puppeteer browser with persistent sessions & UI interaction |
| ๐ Git & GitHub | Full Git operations (including stash/blame) + GitHub API integration |
| ๐๏ธ Database | Read-only SQLite queries with SQL validation |
| โณ Background Commands | Long-running process management and status tracking |
| โก Code Execution | Sandboxed JS/Python + full shell commands (pipes, redirects, env vars) |
| ๐ง Utilities | Clipboard, notifications, system info, memory, session summaries, and environment management |
| ๐ผ๏ธ Image Processing |
list_directory ยท read_file ยท read_file_chunked ยท save_file ยท replace_text_in_file ยท insert_at_line ยท append_file ยท delete_lines_in_file ยท make_directory ยท move_file ยท copy_file ยท delete_path ยท delete_files_by_pattern ยท find_files ยท fuzzy_find_local_files ยท get_file_metadata ยท change_directory ยท analyze_project ยท file_diff ยท directory_tree ยท grep_files ยท find_replace_all
web_search ยท wikipedia_search ยท fetch_web_content ยท rag_web_content
browser_open_page ยท browser_session_control ยท browser_session_close ยท preview_html ยท open_file
Local Operations (isomorphic-git): git_status ยท git_diff ยท git_commit ยท git_log ยท git_add ยท git_checkout ยท git_stash ยท git_blame
Remote API (GitHub CLI gh): gh_create_issue ยท gh_list_issues ยท gh_view_comments ยท gh_create_pr ยท gh_list_prs ยท gh_push
Note: Remote operations require the GitHub CLI to be installed and authenticated (
gh auth login).
query_database
read_document
run_background_command ยท check_background_command ยท cancel_background_command
image_to_text ยท describe_image ยท screenshot_desktop ยท compare_images
http_request ยท http_get_json ยท http_post_json
rag_index_files ยท rag_query_vector ยท rag_clear_index ยท rag_web_content
generate_ui_component ยท render_and_preview_ui ยท extract_ui_data
auto_summarize_context ยท get_context_memory ยท search_context ยท context_summary ยท delete_context_entry ยท clear_context_memory ยท track_important_event ยท save_session_summary ยท get_session_summary ยท save_memory ยท get_memory ยท delete_memory
text_transform ยท text_extract ยท line_operations ยท markdown_table_gen
refactor_code ยท unusedImports
create_plan ยท get_plan ยท update_plan_step
run_javascript ยท run_python ยท execute_command ยท run_in_terminal ยท run_tests
The plugin is installed as an LM Studio plugin. Ensure you have:
gh) โ required for remote GitHub operations (Issues, PRs). Install at https://cli.github.com/The plugin uses a comprehensive configuration schema (src/config.ts) which is exposed in LM Studio's settings UI. Key features include:
Comprehensive documentation of security features, threat models, and responsible disclosure of the AI Toolbox plugin. See SECURITY.md for details.
Deep dive into the AI Toolbox plugin's system architecture, design patterns, and internal workflows. See ARCHITECTURE.md for details.
toolsProvider.ts Refactoring: Declarative Registry PatternArchitectural overhaul of tool registration system โ replaced repetitive gating logic with a clean, maintainable registry pattern using closures.
Fixed critical performance issue where grep_files searched ALL directories including node_modules, .git, and build artifacts.
Resolved critical token undercounting bug caused by incomplete message content extraction when LM Studio SDK v1.x returns array-based content blocks or ChatMessage objects.
ContextGuard.countTokens() now properly extracts text from arrays of content blocks [{"type": "text", "text": "..."}] instead of stringifying entire arraysResolved critical token limit hardcoding, fixed JSON serialization crashes, and added comprehensive safety guardrails to line_operations tool.
getContextLength() API (accurately detects up to 224k+ tokens)summaryModel configuration approachResolved recurring issues where LLMs inserted content at wrong lines due to stale line numbers.
Three-layer defense-in-depth strategy:
| Layer | Parameter | Purpose |
|---|---|---|
| Content-Aware Insertion | insert_after_pattern / insert_before_pattern | Find insertion point by searching file content instead of trusting line numbers |
| Line Fingerprinting | verify_before_insert | Content expected at target_line โ blocks operation if mismatch and shows actual context |
| Bounds Validation | Auto-detection + limits | Rejects out-of-range lines, multi-line content splitting, large insert blocking (>5 lines) |
Example usage:
Impact: All guardrails tested and verified โ 9/9 test scenarios passed with zero regressions.
Eliminated all any type usage and fixed config resolution for ParsedConfig wrapper.
Registered utility tools and cleaned up orphaned gateway pattern code.
backupTools (create_backup, list_backups, restore_backup, delete_backup)cleanupBackupsTool (cleanup_backups)dataVisualizationTools (generate_chart)Introduced the Gateway Pattern to prevent LLM tool-bloat crashes and provide controlled access to all registered tools.
explore_tools โ Discovers available tool categories without exposing all tools at once (prevents grammar parser crashes)execute_gateway_tool โ Delegates execution to any registered tool by name with built-in validationResolved critical grammar parser failure in production โ tool count capping now enforced at 25 tools (was 50), minifier properly wired up.
Resolved critical grammar parser failure and added defensive error handling for SDK token counting.
| Package | Version | Purpose |
|---|---|---|
@lmstudio/sdk | ^1.5.0 | Core SDK for LM Studio plugin development |
@dqbd/tiktoken | ^1.0.22 | Accurate token counting for ContextGuard |
puppeteer | ^24.0.0 | Browser automation |
isomorphic-git | ^1.38.6 | Pure JS Git operations (migrated from simple-git in v1.5.25) |
sharp | ^0.33.5 | Image processing |
tesseract.js | ^7.0.0 | OCR engine |
pdf-parse | ^1.1.1 | PDF document parsing |
mammoth | ^1.6.0 | DOCX document parsing |
archiver | ^8.0.0 | ZIP archive creation |
unzipper | ^0.12.3 | ZIP extraction |
zod | ^3.25.0 | Runtime type validation |
MIT License. See LICENSE for details.
| OCR (Tesseract.js), screenshots, and image comparison |
| ๐ Vector RAG | Semantic search with vector embeddings for intelligent document retrieval |
| ๐จ UI Generation | Generate and render interactive HTML/CSS/JS components in-browser |
| ๐ง Context Management | Automatic session tracking, decision logging, and memory management |
| ๐ Text Processing | Advanced regex-based text transformations (sed/awk equivalents) |
| ๐ Task Planning | Structured multi-step workflow tools (create_plan, get_plan, update_plan_step) |
gh auth logingh_create_issuegh_list_prsTOOL_REGISTRIES) containing 20 entriesconfig, stateManager, and backgroundCommandManager at definition time via arrow functions, eliminating parameter-passing complexityany[] types, replaced with typed closures (() => Tool[]) that satisfy strict ESLint rulesfor...of iteration replaces scattered conditional blocks โ adds tools based on config keys or GOD MODE bypassDEFAULT_EXCLUDED_DIRS Set in walkDirectory() function within src/tools/fileSystemTools.tsnode_modules, .git, dist, build, .next, .nuxt, __pycache__, .cache, vendor, .vscode, .idea, .vsinclude pattern (backward compatible).getText() method or .text property before JSON serialization for structured message objects@typescript-eslint/no-base-to-string error with explicit type checks and scoped suppressionz.any() with z.unknown() in Zod schemaslatest.timestamp! with latest.timestamp ?? 0PluginConfig object from .get() calls instead of direct property access on ParsedConfig wrapperas unknown as double-cast for @typescript-eslint/parser return typelineOperations (delete_lines)markdownPreviewTools (markdown_preview)utility config toggle to enable/disable all utility tools# Install dependencies
npm install
# Build the project (ESM + CJS via Tsup)
npm run build
# Run type checking
npm run typecheck
# Run test suite
npm test
// Pattern-based (line-number-agnostic):
line_operations(file_name, operation: "insert",
insert_after_pattern: "if (width <= 0 || height <= 0)",
content: "// fix"
)
// Verification-based (prevents drift errors):
line_operations(file_name, operation: "insert", target_line: 84,
content: "// fix",
verify_before_insert: "return;" // Content expected at line 84
)