# ShitCode MCP Tools Directory (40 Tools)

ShitCode is a free, open remote Model Context Protocol (MCP) bridge that turns everyday AI chatbots (ChatGPT, Claude, Gemini, Grok, Perplexity) into full computer-use and coding agents on Windows and Linux.

Below is the complete reference directory of all 40 MCP tools provided by the ShitCode bridge. Every tool executes directly on your connected local machine inside your configured workspace.

## Quick Category Index
- [Local Files, Code & Git](#local-tools) (14 tools)
- [Terminal & Processes](#terminal-process) (2 tools)
- [Browser Automation (Playwright)](#browser-automation) (10 tools)
- [Desktop GUI & Window Control](#desktop-control) (7 tools)
- [OS Accessibility Engine](#accessibility-engine) (2 tools)
- [System, Media & Telemetry](#system-media) (5 tools)

---

## <a id="local-tools"></a>Local Files, Code & Git
Read, search, patch, and create local files, inspect Git repositories, run isolated code, and execute custom prompt skills.

### `read_file`
**Description**: Read exact line slices from files with 1-indexed line numbers (<line>: <content>).
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `path` | `string` | Yes | Path to file |
| `offset` | `integer` | No | Start line (1-indexed) |
| `limit` | `integer` | No | Max lines to return |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "read_file",
  "arguments": {"path": "src/index.ts", "start_line": 1, "end_line": 50}
}
```

---

### `write_file`
**Description**: Create or overwrite files with automatic parent directory creation.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `path` | `string` | Yes | Path to file |
| `content` | `string` | Yes | Full file content |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "write_file",
  "arguments": {"path": "src/hello.py", "content": "print('Hello from ShitCode!')\n"}
}
```

---

### `patch_file`
**Description**: Surgical search-and-replace text modification with unified diff verification.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `path` | `string` | Yes | Path to file |
| `old_string` | `string` | Yes | Exact text block to replace |
| `new_string` | `string` | Yes | Replacement text block |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "patch_file",
  "arguments": {"path": "src/app.py", "target": "PORT = 3000", "replacement": "PORT = 8080"}
}
```

---

### `patch`
**Description**: Alias for patch_file. Surgical search-and-replace text modification with unified diff verification.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `path` | `string` | Yes | Path to file |
| `old_string` | `string` | Yes | Exact text block to replace |
| `new_string` | `string` | Yes | Replacement text block |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "patch",
  "arguments": {"path": "config.json", "diff": "@@ -1,3 +1,3 @@\n-debug: false\n+debug: true"}
}
```

---

### `multi_patch_file`
**Description**: Perform multiple non-contiguous edits in a single file atomically with unified diff validation.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `path` | `string` | Yes | Path to file |
| `patches` | `array` | No | List of search-and-replace patch chunks (or 'replacements') |
| `replacements` | `array` | No | Alias for patches |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "multi_patch_file",
  "arguments": {"path": "main.py", "patches": [{"target": "v1.0", "replacement": "v1.6"}]}
}
```

---

### `list_dir`
**Description**: Explore directory tree structures with file sizes and type markers.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `path` | `string` | No | Directory path |
| `recursive` | `boolean` | No | List subdirectories recursively |
| `max_depth` | `integer` | No | Max directory traversal depth |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "list_dir",
  "arguments": {"path": ".", "max_depth": 2, "include_hidden": false}
}
```

---

### `grep_search`
**Description**: Fast line-by-line regex or literal content search with file inclusion glob filters.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `pattern` | `string` | No | Search pattern or regex (or query) |
| `query` | `string` | No | Alias for pattern |
| `path` | `string` | No | Search directory path |
| `includes` | `array` | No | File glob patterns (e.g. ['*.py']) |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "grep_search",
  "arguments": {"pattern": "createLenisInstance", "path": "src", "context_lines": 2}
}
```

---

### `find_files`
**Description**: Fast glob filename discovery across directory trees.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `pattern` | `string` | Yes | Filename pattern to match (e.g. '*config*.json') |
| `path` | `string` | No | Search root directory |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "find_files",
  "arguments": {"pattern": "*.astro", "path": "src/pages"}
}
```

---

### `search_files`
**Description**: Search for text patterns or filenames across the workspace (combined find/grep discovery).
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `pattern` | `string` | No | Pattern to search for (or query) |
| `query` | `string` | No | Alias for pattern |
| `target` | `string` | No | Search mode |
| `path` | `string` | No | Root directory to search within |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "search_files",
  "arguments": {"query": "tutorial", "path": "src"}
}
```

---

### `git_status`
**Description**: Inspect git working tree status, modified/untracked files, and summary diffs.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `path` | `string` | No | Repository path |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "git_status",
  "arguments": {"untracked": true}
}
```

---

### `execute_code`
**Description**: Sandboxed Python script runner for testing snippets, algorithms, and data calculations.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `code` | `string` | Yes | Python code to execute |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |

**Example MCP Tool Call**:
```json
{
  "tool": "execute_code",
  "arguments": {"code": "import sys; print(f'Python {sys.version}')", "timeout": 10}
}
```

---

### `skills_list`
**Description**: MANDATORY FIRST STEP: Discover all specialized workflow manuals, coding guidelines, and SOPs (SKILL.md) stored in the CLI's root 'skills/' folder (including UI animation & design, speech/TTS, testing, deployment). Always call this first before performing complex or domain-specific tasks.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `category` | `string` | No | Optional category filter |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "skills_list",
  "arguments": {}
}
```

---

### `skill_view`
**Description**: Read the full markdown workflow guidelines and instructions for a specific skill from the CLI root 'skills/' directory into context.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `name` | `string` | Yes | Exact name of the skill to read |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "skill_view",
  "arguments": {"name": "code-review"}
}
```

---

### `skill_manage`
**Description**: Dynamically create, update, or delete custom skill manuals inside the CLI's root 'skills/' directory.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `action` | `string` | Yes |  |
| `name` | `string` | Yes | Skill name |
| `category` | `string` | No | Skill category |
| `content` | `string` | No | Skill markdown content |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "skill_manage",
  "arguments": {"action": "create", "name": "test-runner", "content": "Run pytest on modified files"}
}
```

---

## <a id="terminal-process"></a>Terminal & Processes
Execute shell commands (PowerShell/CMD on Windows, Bash on Linux) and monitor background processes.

### `terminal`
**Description**: Execute shell commands (PowerShell/CMD on Windows, Bash on Linux) with directory memory and background execution.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `command` | `string` | Yes | Shell command to run |
| `background` | `boolean` | No | Run in background and return session ID |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |

**Example MCP Tool Call**:
```json
{
  "tool": "terminal",
  "arguments": {"command": "npm run build", "cwd": "c:/projects/myapp", "timeout": 30}
}
```

---

### `process_manage`
**Description**: Inspect, monitor, tail logs, or terminate background processes.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `action` | `string` | Yes | Action to perform |
| `session_id` | `string` | No | Target background session ID |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "process_manage",
  "arguments": {"action": "list"}
}
```

---

## <a id="browser-automation"></a>Browser Automation (Playwright)
Full headless or visible browser control via Playwright: click, type, screenshot, evaluate JavaScript, and inspect console/network.

### `browser_open`
**Description**: Launch the built-in isolated ShitCode automation browser (Playwright with persistent profile) and navigate to a URL. Dedicated to high-speed web scraping, documentation reading, automated testing, and form filling with 100% reliable DOM selectors. Automatically launches a visible headed window on desktop GUI environments with headless fallback on remote servers. NOTE: To automate or interact with the user's personal everyday browser (e.g. Chrome, Edge, Brave with live logins to Gmail, YouTube, Twitter, GitHub), use Desktop Computer Control ('computer_actions', 'window_focus', 'clipboard_*') instead.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `url` | `string` | Yes | Target webpage URL to visit |
| `headless` | `boolean` | No | Force headless background mode (omits visible window). Default is headed when display is available |
| `fast_mode` | `boolean` | No | Block heavy ad networks and tracking beacons for maximum speed |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_open",
  "arguments": {"url": "https://news.ycombinator.com", "headless": true}
}
```

---

### `browser_actions`
**Description**: Execute a compound batch of browser actions sequentially in a single turn (e.g. open page, fill fields, click buttons, evaluate JavaScript, and verify outcome). Drastically cuts round-trip latency and provides real-time step execution feedback in the CLI terminal.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `actions` | `array` | Yes | Ordered list of action objects to execute sequentially (supported actions: goto, fill, fill_form, click, select, wait_for, assert_visible, extract_scoped, evaluate, eval, screenshot, wait) |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_actions",
  "arguments": {"actions": [{"action": "navigate", "url": "https://google.com"}, {"action": "type", "selector": "textarea[name=q]", "text": "ShitCode MCP"}, {"action": "screenshot"}]}
}
```

---

### `browser_click`
**Description**: Click an interactive element (button, link, input) on the active web page by CSS selector or text.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `selector` | `string` | Yes | CSS selector, label, placeholder, or text to click |
| `text` | `string` | No | Optional text to match if selector is generic |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_click",
  "arguments": {"selector": "button[type=submit]"}
}
```

---

### `browser_type`
**Description**: Type text into a form field, search bar, or editable element on the active web page.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `selector` | `string` | Yes | CSS selector, label, or placeholder of target input field |
| `text` | `string` | Yes | Text content to type into the field |
| `press_enter` | `boolean` | No | Press Enter key after typing |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_type",
  "arguments": {"selector": "input[name=username]", "text": "developer", "press_enter": true}
}
```

---

### `browser_extract`
**Description**: Extract clean, readable Markdown, interactive element catalog, plain text, or scoped HTML from the active web page (token-efficient reading).
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `format` | `string` | No | Output format: 'interactive' returns compact button/input catalog (~300 tokens), 'markdown' returns readable content, 'text' returns plain text, 'html' returns raw DOM |
| `selector` | `string` | No | Optional CSS selector or target to scope extraction to specific container |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_extract",
  "arguments": {"selector": "main", "format": "markdown"}
}
```

---

### `browser_screenshot`
**Description**: Capture visual screenshot of the current page or element for visual layout and UI validation.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `full_page` | `boolean` | No | Capture full scrollable page height |
| `selector` | `string` | No | Optional CSS selector to screenshot specific element |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_screenshot",
  "arguments": {"full_page": false}
}
```

---

### `browser_evaluate`
**Description**: Execute arbitrary JavaScript expression or function in the active browser page context. Returns the evaluated result. Ideal for inspecting client-side SPA state, reading localStorage, dispatching custom events, or calculating element geometry.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `expression` | `string` | Yes | JavaScript expression, code block, or function to evaluate in the page (e.g. 'document.title', 'window.scrollY', '() => localStorage.getItem("token")') |
| `arg` | `any` | No | Optional argument passed into the evaluated function |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_evaluate",
  "arguments": {"expression": "document.title"}
}
```

---

### `browser_console`
**Description**: Retrieve captured browser console logs, warnings, and uncaught JavaScript runtime errors. Essential for diagnosing page issues, broken scripts, and client-side exceptions.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `level` | `string` | No | Filter logs by severity level (default: 'all') |
| `limit` | `integer` | No | Maximum number of recent log entries to return (default: 50, max: 200) |
| `clear` | `boolean` | No | Clear the in-memory console log buffer after retrieving |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_console",
  "arguments": {"min_level": "warn"}
}
```

---

### `browser_network`
**Description**: Capture and inspect HTTP network traffic, API requests, status codes, headers, and response payloads. Use this to trace failed API calls (4xx/5xx) and inspect Fetch/XHR responses.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `filter_type` | `string` | No | Filter requests by resource type: 'api' matches both xhr and fetch (default: 'all') |
| `failed_only` | `boolean` | No | Only return failed requests or HTTP status >= 400 |
| `include_headers` | `boolean` | No | Include request and response headers in the report |
| `include_body` | `boolean` | No | Include captured response body (for JSON/XHR/Fetch responses) |
| `limit` | `integer` | No | Maximum number of recent network requests to return (default: 50, max: 200) |
| `clear` | `boolean` | No | Clear the in-memory network request buffer after retrieving |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_network",
  "arguments": {"status_code": 404}
}
```

---

### `browser_close`
**Description**: Close the active built-in browser session and save its persistent profile.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "browser_close",
  "arguments": {}
}
```

---

## <a id="desktop-control"></a>Desktop GUI & Window Control
Native desktop input: physical mouse clicks, keyboard typing, window switching, state changes, and system clipboard access.

### `clipboard_write`
**Description**: Copy text string to the operating system clipboard.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `text` | `string` | Yes | Text content to copy into clipboard |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "clipboard_write",
  "arguments": {"text": "https://shitcode.in"}
}
```

---

### `clipboard_read`
**Description**: Read the current text contents from the operating system clipboard.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "clipboard_read",
  "arguments": {}
}
```

---

### `computer`
**Description**: Cross-platform OS desktop GUI automation tool (Anthropic Computer Use API standard). Take screenshots, move mouse, click, drag, type, and press hotkeys across Windows and Linux desktops. Use this tool or 'computer_actions' for visual tasks (canvas apps, Figma, games, layout verification) or when operating the user's personal everyday browser (Chrome, Edge, Brave) with live logins. Screenshots are returned as optimized image blocks.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `action` | `string` | Yes | Desktop action to perform. |
| `coordinate` | `array` | No | [x, y] coordinates in screenshot coordinate space (or native screen pixels) for mouse actions. |
| `text` | `string` | No | Text to type or paste, key or hotkey combination to press (e.g. 'Return', 'ctrl+c', 'alt+tab', 'Win+r'), window title to focus, or scroll amount. |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "computer",
  "arguments": {"action": "left_click", "coordinate": [960, 540]}
}
```

---

### `computer_actions`
**Description**: Execute a compound batch of desktop OS actions sequentially in a single turn (e.g. focus window, click, paste text via clipboard, press enter, and capture result screenshot). Dramatically cuts round-trip latency and provides real-time terminal progress indicators in the CLI. Recommended for automating desktop applications and interacting with the user's personal everyday browser (Chrome, Edge, Brave) with their active logins.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `actions` | `array` | Yes | Ordered list of desktop action objects to execute sequentially. |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "computer_actions",
  "arguments": {"actions": [{"action": "mouse_move", "coordinate": [500, 300]}, {"action": "left_click"}, {"action": "type", "text": "hello"}]}
}
```

---

### `windows_list`
**Description**: List all open desktop application windows with titles, window IDs, PIDs, and bounding box coordinates on the user's host machine (Windows & Linux).
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "windows_list",
  "arguments": {}
}
```

---

### `window_focus`
**Description**: Activate and bring the target desktop application window (e.g. Chrome, Notepad, VS Code) to the foreground before interacting.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `title` | `string` | No | Substring matching the window title (case-insensitive) |
| `window_id` | `string` | No | Optional exact window handle or ID |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "window_focus",
  "arguments": {"title": "Visual Studio Code"}
}
```

---

### `window_state`
**Description**: Change window state: maximize, minimize, restore, or close.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `action` | `string` | Yes | Target window state action |
| `title` | `string` | No | Substring matching window title |
| `window_id` | `string` | No | Optional exact window handle or ID |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "window_state",
  "arguments": {"title": "Chrome", "state": "maximize"}
}
```

---

## <a id="accessibility-engine"></a>OS Accessibility Engine
Traverse high-fidelity UIAutomation accessibility trees with numbered targets for robust, coordinate-free GUI interactions.

### `desktop_snapshot`
**Description**: FAST ACCESSIBILITY ENGINE: Read interactive controls (buttons, inputs, menus, checkboxes, tabs) of a desktop window using native OS accessibility trees (Windows UIAutomation / Linux AT-SPI). Returns a compact token-efficient JSON tree with element refs (@e1, @e2). Interacts headlessly without moving the cursor or taking screenshots. Use for standard desktop tasks.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `app_name` | `string` | No | Optional substring matching the target application name or window title. If omitted, targets the active foreground window. |
| `window_id` | `string` | No | Optional exact window handle or ID. |
| `interactive_only` | `boolean` | No | If True (default), filters to actionable controls (buttons, edits, checkboxes, menus). If False, includes text labels. |
| `max_elements` | `integer` | No | Maximum number of elements to return (default 60). |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "desktop_snapshot",
  "arguments": {"app_name": "Calculator", "max_elements": 50}
}
```

---

### `desktop_interact`
**Description**: FAST ACCESSIBILITY ACTION: Perform a headless action on a desktop UI element using its ref from desktop_snapshot (e.g. '@e1'). Clicks, toggles, or sets text headlessly without moving the physical mouse pointer. Falls back to deterministic physical click at element bounds if headless invoke is unsupported.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `ref` | `string` | Yes | Element ref ID returned by desktop_snapshot (e.g. '@e1') |
| `action` | `string` | No | Action to perform on the element. Defaults to 'click'. |
| `text` | `string` | No | Text to set or type if action is 'type' |
| `app_name` | `string` | No | Optional application name or window title to verify before acting |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "desktop_interact",
  "arguments": {"element_id": 14, "action": "click"}
}
```

---

## <a id="system-media"></a>System, Media & Telemetry
Hardware stats, connected device listing, web page scraping, and local media inspection.

### `devices_list`
**Description**: List all your online computers connected to ShitCode (name, OS type, primary status). Use this tool to discover available machines for targeted execution.
**Read-Only / Safe**: `true`

**Parameters**: None (no arguments required).

**Example MCP Tool Call**:
```json
{
  "tool": "devices_list",
  "arguments": {}
}
```

---

### `web_extract`
**Description**: Fetch URLs and extract clean, readable markdown/text for documentation and API references.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `url` | `string` | No | Single URL to fetch |
| `urls` | `array` | No | List of URLs to fetch |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "web_extract",
  "arguments": {"url": "https://example.com", "format": "markdown"}
}
```

---

### `system_info`
**Description**: Retrieve structured operating system health, CPU load %, RAM usage, disk space, and top resource-consuming processes.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "system_info",
  "arguments": {}
}
```

---

### `image_inspect`
**Description**: Inspect and visually analyze any local image file on the user's computer (PNG, JPG, JPEG, WEBP, BMP, SVG). Returns image dimensions, metadata, and visual image data directly for AI multimodal vision analysis.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `path` | `string` | Yes | Absolute or workspace-relative path to the image file |
| `max_dimension` | `integer` | No | Optional maximum pixel width/height to resize before visual analysis (default: 1920) |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "image_inspect",
  "arguments": {"path": "assets/diagram.png"}
}
```

---

### `video_inspect`
**Description**: Inspect and visually analyze local video files on the user's computer in chunked temporal windows (default: 8 frames covering 16 seconds at 0.5 fps). Returns video metadata, individual frame timestamps, and a 'Next Window' pagination cursor to inspect subsequent segments or jump to specific timestamps without overflowing token context.
**Read-Only / Safe**: `true`

**Parameters**:
| Name | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `path` | `string` | Yes | Absolute or workspace-relative path to the video file |
| `start_time` | `string` | No | Start timestamp in seconds or HH:MM:SS format (e.g. '0', '00:00:16', '45'). Default: '0' |
| `fps` | `number` | No | Sampling rate in frames per second (default: 0.5, i.e. 1 frame every 2s) |
| `max_frames` | `integer` | No | Number of sample frames in this window (default: 8, max: 12) |
| `duration` | `string` | No | Optional maximum duration to sample (e.g. '00:00:16' or '16') |
| `device` | `string` | No | Optional target machine name, ID, or OS ('windows' or 'linux') to route this tool execution to. If omitted, routes automatically. |
| `timeout` | `number` | No | Optional execution timeout in seconds (min 1, default 60, max 120). Values above 120s are automatically clamped to 120s. |

**Example MCP Tool Call**:
```json
{
  "tool": "video_inspect",
  "arguments": {"path": "demo.mp4"}
}
```

---

## How to Connect to These Tools
1. **Start the local client**: Run `shitcode.bat` (Windows) or `./shitcode.sh` (Linux).
2. **Add MCP connector**: Add `https://mcp.shitcode.in/mcp` (or `/sse`) into your AI assistant.
3. **Authorize**: Approve the 1-click OAuth login in your browser.
4. **Ask anything**: Ask your chatbot to inspect files, run tests, browse web pages, or automate tasks!

For full setup guide and video walkthrough, visit [ShitCode Tutorial](https://shitcode.in/tutorial/).
