Project Files
A feature-rich LM Studio plugin that gives your local LLM a full suite of tools for autonomous coding, research, file management, and more. It acts as a bridge between the model and your local environment.
[!IMPORTANT] This is an independent fork of Beledarian's LM Studio Toolbox, maintained at haggyroth/LM_Studio_Toolbox.
Find this project helpful? Consider giving it a ⭐ on GitHub or contributing! Encountering issues? Submit them here.
protectedPaths prevents the model from touching sensitive directories.replace_text_in_file, multi_replace_text, insert_at_line, delete_lines_in_file, and edit_file_with_diff for surgical edits without rewriting entire files.search_directory provides grep-style multi-file search with context lines, regex support, exclude patterns, and a configurable max_matches cap.watch_file / watch_directory for reactive workflows that respond to changes on disk.consult_secondary_agent dispatches to a specialised sub-agent — coder, reviewer, researcher, debugger, tester, documenter, planner, data_analyst, or general.chain list to run multiple roles in sequence, each receiving the previous output (e.g., coder → tester → reviewer).[Execution log] of tool calls and outcomes for transparency.Retry-After header support and exponential backoff for transient network errors.interrupt_sub_agent injects a correction message into a running sub-agent loop without cancelling it.get_sub_agent_result re-reads the last completed result without launching a new session.save_memory, list_memories, search_memories, update_memory, delete_memory.memoryAutoCapture mode distills key facts from each session automatically.run_python uses sys.addaudithook to block network access, subprocess spawning, and writes outside the workspace.run_javascript runs Node.js code in a temp file.run_test_command executes your project's test suite (npm test, pytest, etc.) from inside a sub-agent loop.lint_project runs your project's linter and returns structured output.execute_command (background) and run_in_terminal (interactive) for shell access.[!WARNING] Enabling shell or terminal execution allows the model to run arbitrary commands on your system.
find_symbol: Locate where a function, class, or variable is defined using AST analysis — no grep false positives.find_usages: Find all call sites for a symbol across the workspace.rename_symbol: Atomically rename an identifier across the entire workspace in a single operation.web_search (DuckDuckGo + HTML fallback), wikipedia_search.fetch_web_content, rag_web_content (with SSRF protection — private IPs blocked, redirects re-validated).browser_session_open / browser_session_control / browser_session_close flow for multi-step navigation, form filling, and JavaScript evaluation.capture_screenshot — open a URL, capture a screenshot, and save it to your workspace in one call.rag_local_files — semantic search over workspace files with embedding cache.git_status, git_diff (word-level mode), git_log, git_add, git_commit, git_pull, git_push, git_checkout.gh_create_issue, gh_list_issues, gh_create_pr, gh_list_prs, gh_view_pr_diff, and more.query_database: Read-only SQL queries against a SQLite file in your workspace.query_csv: Query a CSV file with SQL-style filtering and sorting.transform_json: Transform a JSON file using a JavaScript expression.analyze_project: Scan the workspace and produce a structured project summary.tool_usage_stats: Audit log of tool call counts and patterns for the current session.save_session_note: Persist a note about the current session for future reference.save_workspace_profile, switch_workspace_profile, list_workspace_profiles for quickly switching between project contexts.Drop a .js file into ~/.lm-studio-toolbox/plugins/ to register your own tools at startup — no forking required. See PLUGINS.md for the format.
git clone https://github.com/haggyroth/LM_Studio_Toolbox.git cd LM_Studio_Toolbox npm install lms push # install into LM Studio permanently # or lms dev # development mode with hot reload
git clone https://github.com/haggyroth/LM_Studio_Toolbox.git cd LM_Studio_Toolbox npm install lms dev # hot-reloads on every source change
Run the full quality pipeline before submitting a PR:
npm run ci # typecheck → lint → build → test
See CONTRIBUTING.md for the full contribution guide.
All settings are accessible in the LM Studio Plugins tab. Key options:
| Setting | Description | Default |
|---|---|---|
| Enable Secondary Agent | Enables the consult_secondary_agent tool | off |
| Secondary Agent Endpoint | OpenAI-compatible endpoint for sub-agents | http://localhost:1234 |
| Secondary Model ID | Model to use for sub-agents | (blank = same as main) |
| Sub-Agent Loop Limit | Max LLM turns per sub-agent run | 8 |
| Sub-Agent Time Limit | Wall-clock deadline in seconds | 600 |
| Sub-Agent: Show Execution Log | Append a compact tool-call log to each response | on |
| Sub-Agent Profiles | JSON map of role → system prompt overrides | (built-in defaults) |
| Enable Memory | Activates persistent memory tools | off |
| Memory Auto-Capture | Auto-distill key facts from each session | off |
| Default Workspace Path | Startup working directory | (LM Studio home) |
| Allow Code Execution | Enables Python, JS, shell, terminal tools | off |
| Allow Browser Control | Enables browser automation tools | off |
| Allow GitHub Tools | Enables gh_* CLI tools | off |
| Protected Paths | Comma-separated paths the model cannot access | (empty) |
| Tool | Description |
|---|---|
list_directory | List files and directories with metadata |
change_directory | Change the active workspace directory |
make_directory | Create a new directory |
read_file | Read a file (with token estimate and truncation notice) |
read_file_range | Read a specific line range |
save_file | Create or overwrite a file (supports batch) |
append_file | Append content to an existing file |
insert_at_line | Insert lines at a specific position |
replace_text_in_file | Replace the first occurrence of a string |
multi_replace_text | Apply multiple replacements in one call |
delete_lines_in_file | Delete a range of lines |
edit_file_with_diff | Apply a unified diff |
delete_path | Delete a file or directory |
delete_files_by_pattern | Regex-based bulk delete |
move_file | Move or rename a file |
copy_file | Copy a file |
get_file_metadata | Stat a file (size, mtime, type) |
apply_patch | Apply a patch file |
| Tool | Description |
|---|---|
search_directory | Grep-style multi-file search with context, regex, exclude patterns, and max_matches |
search_in_file | Search within a single file |
find_files | Find files by name pattern |
fuzzy_find_local_files | Fuzzy filename search (Levenshtein) |
| Tool | Description |
|---|---|
consult_secondary_agent | Delegate a task to a specialised sub-agent |
get_sub_agent_result | Re-read the last completed sub-agent result |
interrupt_sub_agent | Inject a steering message into a running sub-agent |
| Tool | Description |
|---|---|
save_memory | Store a persistent fact |
list_memories | List stored memories (optionally filtered by tag) |
search_memories | Full-text search over stored facts |
update_memory | Edit a stored memory by ID |
delete_memory | Remove a memory by ID |
| Tool | Description |
|---|---|
web_search | DuckDuckGo search |
wikipedia_search | Wikipedia article search and summary |
fetch_web_content | Fetch and parse a URL |
rag_web_content | Semantic search over a URL's content |
browser_session_open | Open a persistent browser session |
browser_session_control | Navigate, click, type, evaluate JS |
browser_session_close | Close a browser session |
browser_open_page | Stateless one-shot page read |
capture_screenshot | Screenshot a URL and save to workspace |
| Tool | Description |
|---|---|
run_python | Sandboxed Python execution |
run_javascript | Node.js script execution |
run_test_command | Run the project's test suite |
lint_project | Run the project's linter |
execute_command | Background shell command |
run_in_terminal | Interactive terminal |
run_background_command | Spawn a long-running background process |
check_background_command | Poll a background command for output |
cancel_background_command | Cancel a background command |
| Tool | Description |
|---|---|
find_symbol | Find where a TypeScript/JS symbol is defined (AST) |
find_usages | Find all usages of a symbol |
rename_symbol | Atomically rename across the workspace |
Git: git_status, git_diff, git_log, git_add, git_commit, git_pull, git_push, git_checkout
GitHub CLI: gh_create_issue, gh_list_issues, gh_view_comments, gh_create_pr, gh_list_prs, gh_view_pr_diff
| Tool | Description |
|---|---|
query_database | Read-only SQL against a SQLite file |
query_csv | SQL-style queries over a CSV file |
transform_json | Transform JSON with a JS expression |
rag_local_files | Semantic search over workspace files |
analyze_project | Structured project summary |
tool_usage_stats | Session tool-call audit log |
save_session_note | Persist a note for future sessions |
save_workspace_profile | Save a named workspace configuration |
switch_workspace_profile | Activate a saved workspace profile |
list_workspace_profiles | List saved profiles |
get_system_info, read_clipboard, write_clipboard, open_file, preview_html, read_document, send_notification, watch_file, watch_directory, stop_watch, list_watches
See CHANGELOG.md for the full version history.
See CODE_OVERVIEW.md for architectural details and SUB_AGENT.md for a deep-dive on the sub-agent pipeline.