Updated to reflect current state: 116 unique tool names dynamically registered across ~20 categories.
π Overview
Category
Count
Default State
Status
File System
17
β Enabled
Active
Code Refactoring
1
β Enabled
Active
Web Research
4
β Enabled
Active
Browser Automation
5
β Disabled
Active
Git & GitHub
15
β Disabled
Active
Database
1
β Disabled
Active
Background Commands
3
β Disabled
Active
Execution
5
β Disabled
Active
Utilities
~29
β Enabled
Active
Image Processing
4
β Enabled
Active
Vector RAG
4
β Enabled
Active
UI Generation
3
β Disabled
Active
Context Management
7
β Enabled
Active
Text Processing
5
β Enabled
Active
Backup & Restore
4
β Always Available
Active
Data Visualization
1
β Not Registered
β οΈ Inactive (dataVisualizationTools.ts exists but not in toolsProvider.ts)
Document Parsing
1
β Enabled
Active
HTTP Client
3
β Disabled
Active
Gateway Tools (v1.6.2+)
2
β Always Enabled
Active
β οΈ Note: The generate_chart tool is defined in src/tools/dataVisualizationTools.ts but has not been registered in the REGISTER_MAP of toolsProvider.ts. It will not be available until added to the provider configuration.
π File System (17)
Basic Operations
Tool
Description
list_directory
List files and directories with optional depth control; supports recursive traversal
read_file
Read file content with auto-chunking for large files; binary detection prevents corrupt output
read_file_chunked
Read files in structured chunks returning start/end indices for streaming control
save_file
Atomic write operations (temp-file-then-rename) with parent directory creation; batch save support
Text Editing
Tool
Description
replace_text_in_file
Replace text globally or per-occurrence with backup, line-ending preservation, binary protection
insert_at_line
Insert content at specific 1-indexed line number; CRLF/LF detection preserves Windows line endings
append_file
Append text to file end (or create if missing); combined size limit enforcement (existing + new β€ 10MB)
delete_lines_in_file
Delete single or range of lines; default backup=true for irreversible operations
Directory & File Management
Tool
Description
make_directory
Create directory with recursive parent creation; idempotent (succeeds if exists)
move_file
Move/rename files or directories using atomic rename with cross-filesystem copy+delete fallback
copy_file
Copy file to new location with atomic write and parent directory auto-creation
delete_path
Delete file or recursively delete directory with proper error handling
change_directory
Set working directory for all subsequent file operations; validates path exists and is a directory
Search & Analysis
Tool
Description
find_files
Recursive filename search with async optimization and configurable depth limit (default: 5)
fuzzy_find_local_files
Levenshtein-based fuzzy name matching with 60s caching; excludes large directories automatically
get_file_metadata
Retrieve size, creation/modification/access timestamps via fs.stat()
π§ Code Refactoring (1)
Requires "π§ AST Code Refactoring Tools" toggle in settings or God Mode.
AST-Driven Refactoring Engine (refactor_code)
Leverages Babel's Abstract Syntax Tree (AST) parser for safe, syntax-aware code transformations. Replaces fragile line-based string manipulation with proper node traversal and regeneration. Supports TypeScript out-of-the-box.
Operation
Description
rename_identifier
Globally rename variables, functions, or class names across a file using AST binding analysis
move_function
Extract functions (including Arrow Functions & Class Methods) to another file with proper syntax preservation
extract_function
Pull selected code blocks into new standalone functions via Babel AST parsing
unused_import_cleanup
Detect and remove dead imports/specifiers using static analysis; TypeScript-aware (import type)
ποΈ Recode Engine (Modular Rule Architecture)
The src/tools/recodeTool/ module implements a pluggable rule engine for advanced AST-based code analysis. Rules are applied sequentially with dry-run diff output and backup/rollback support.
Rule File
Purpose
Status
unusedImports.ts
Identifies unused imports via cross-reference analysis against usage patterns
Detects overly complex relative imports and suggests normalized paths
β Implemented (Tier 1)
typeInference.ts
Identifies explicit any annotations and infers better types or suggests unknown
β Implemented (Tier 1)
asyncModernizer.ts
Detects callback-style functions ((err, data) => { ... }) and Promise .then() chains for async/await conversion
β Implemented (Tier 2)
β οΈ Note on deadCodeDetection.ts: Currently performs single-file AST traversal. It flags exports not used within the same file, which may produce false positives since exports are typically consumed elsewhere. Full project-wide integration is in progress.
π Usage Examples
1. Rename Identifiers
2. Move Functions Between Files
3. Extract Code Block into New Function
4. Clean Up Unused Imports
βοΈ Key Features
β AST-Based: No regex or line-splitting bugs; handles multiline constructs, template literals, and partial statements safely.
π Web Research (4)
Tool
Description
web_search
Multi-engine search (DDG, Google, Bing) with automatic fallback chain configuration
wikipedia_search
Search Wikipedia summaries supporting multiple languages; returns concise overviews
fetch_web_content
Clean text extraction from URLs removing ads/navigation; supports custom headers and timeouts
rag_web_content
Fetch URL content via RAG pipeline returning only semantically relevant text chunks to query
π₯οΈ Browser Automation (5)
Tool
Description
browser_open_page
Navigate Puppeteer headless browser to URL with optional selector wait and screenshot capture
browser_session_control
Manage persistent browser session lifecycle including connection state and inactivity timers
browser_session_close
Gracefully close browser session preventing orphaned Chromium processes
preview_html
Render raw HTML or existing .html file in default system browser via OS shell command
open_file
Open files/URLs in system default application (Windows start, macOS open, Linux xdg-open)
π Git & GitHub (15)
Git Operations
Tool
Description
git_status
Repository status: staged/unstaged files, branch info, ahead/behind counts vs remote
git_diff
Changes between commits/branches/work-tree with stat summary and name-only options
git_commit
Commit staged changes; supports --amend for modifying last commit and -a for auto-staging
git_log
Ordered commit history with max-count, date range, author filtering and custom format output
git_add
Stage files (individual, directory, or all) returning list of staged items with status
Retrieve past entries filtered by type (decision/pattern/config/error/summary) with result limits
search_context
Fuzzy text search across titles, content bodies, tags for efficient retrieval and analysis
context_summary
Statistical overview: total entries, type breakdowns, recent activity counts for auditing
delete_context_entry
Remove specific context entry by unique ID without clearing entire history
clear_context_memory
Clear all persistent memory entries (β οΈ irreversible; requires confirm=true)
track_important_event
Manually record events/decisions/milestones with custom tags for categorized retrieval
π Text Processing (5)
Tool
Description
text_transform
Regex substitution with capture groups ($1, $2), line ranges, global/case-insensitive modes; safer than shell sed
line_operations
Insert/delete/reorder lines using awk-like operations without shell dependencies; atomic writes safety
text_extract
Structured data extraction from delimited text (CSV/TSV/custom) with configurable zero-based field indices
markdown_table_gen
Generate Markdown tables from object arrays with headers, alignment, truncation, and customizable ellipsis
refactor_code
AST-driven code refactoring: rename identifiers, move functions (including Arrow Functions & Class Methods), extract code blocks into new functions via Babel AST parsing β no more line-based string splitting errors
πΎ Backup & Restore (4)
Tool
Description
create_backup
Compressed ZIP backup of entire working directory stored in .ai_toolbox_backups/; requires confirm=true
list_backups
List backups sorted by date newest-first with filename, path, size bytes, and creation timestamp
restore_backup
Restore full working directory from archive (β οΈ overwrites all files; requires confirm=true)
delete_backup
Remove specific backup file (β οΈ irreversible; validates existence before deletion)
Purpose: Single entry point for tool discovery and execution to prevent LLM tool-bloat crashes. Only 2 tools sent to llama.cpp initially, dynamically routing the full suite of 116 registered tools on demand.
explore_tools
Discovers available tools and their categories without exposing the full suite of 116 dynamically registered tools at once. Returns category names only (not individual tool names) to keep schema small.
Parameter
Type
Required
Description
category
string
No
Optional: Filter by specific category name (e.g., "fileSystem", "webSearch")
Executes any registered tool by name with built-in validation and error handling. Delegates to the existing ToolRegistry for execution.
Parameter
Type
Required
Description
toolName
string
Yes
Name of the tool to execute (e.g., "read_file", "web_search")
arguments
Record<string, unknown>
Yes
Tool-specific arguments as key-value pairs
Returns: Tool execution result or error message
Example Usage:
AI Workflow:
Why Gateway? Sending the entire registry of 116+ tool schemas directly to llama.cpp's grammar parser causes failed to parse grammar errors due to EBNF recursion limits. The Gateway pattern reduces initial schema payload from 116 β 2 tools while maintaining full functionality on-demand via delegation.
π Data Visualization (1)
Tool
Description
generate_chart
Create line/bar/pie/scatter/area charts outputting SVG/PNG with customizable colors, labels, legends
π Document Parsing (1)
Tool
Description
read_document
Read PDF (pdf-parse), DOCX (mammoth), or TXT files; automatic binary detection prevents corrupt output
Generic GET/POST/PUT/DELETE/PATCH client with retry logic, timeout config, multipart upload support
http_get_json
GET requests expecting JSON response with automatic parsing and optional schema validation
http_post_json
POST requests with JSON payload, content-type auto-handling, auth token support, status code return
βοΈ Configuration Summary
All categories toggleable in LM Studio settings panel. Most dangerous tools disabled by default requiring explicit opt-in through the UI. God Mode enables all categories instantly β use cautiously.
β Code sandboxing for JS/Python execution (no , , or )
β οΈ Important: Most dangerous tools disabled by default requiring explicit user opt-in through settings panel. God Mode bypasses all category restrictions.
Reference generated from actual source code analysis on 2026-07-12 (v1.6.2). All tool counts verified against tools.push() calls in src/tools/.ts and gatewayTools.ts.*
β TypeScript Support: Parses .ts/.tsx natively with typescript plugin enabled.
β Smart Import Removal: Handles mixed imports (e.g., import { used, unused } from 'lib') by removing only dead specifiers while preserving formatting.
β Backup & Safety: Automatically creates .bak backup before any file modification.
require()
eval()
child_process
β SSRF protection blocking private IP ranges via HTTP client
β Regex ReDoS protection treating unsafe patterns as literals
// Renames 'oldVar' to 'newVar' across the entire file{ "file_path": "./src/index.ts", "operation": "rename_identifier", "old_name": "oldVar", "new_name": "newVar"}
// Moves 'calculateTotal' from src.ts to utils.ts{ "file_path": "./src/operations.ts", "operation": "move_function", "old_name": "placeholder", // required by schema, ignored for this operation "function_name": "calculateTotal", "target_path": "./src/utils.ts"}
// Extracts the provided code block into a function named 'processData'{ "file_path": "./src/handler.ts", "operation": "extract_function", "old_name": "const result = value * 2;\nconsole.log(result);", // raw code to extract "new_name": "processData"}
// Scans file for dead imports and removes them automatically{ "file_path": "./src/module.ts", "operation": "unused_import_cleanup"}
{ "toolName": "read_file", "arguments": { "file_name": "./src/index.ts" }}// Delegates to provider.executeTool("read_file", args) with full validation
User Message β AI calls explore_tools(category="fileSystem") β Returns: { success: true, categories: ["read_file", "write_file", ...] } β AI decides to use read_file β AI calls execute_gateway_tool(toolName="read_file", arguments={file_name: "example.txt"}) β Gateway delegates to provider.executeTool("read_file", args) β Tool executes with full validation, security checks, error handling