install_tool
Install a GitHub repository as a local MCP tool with sandboxed build and self-tests, then request only needed read-only folder or network access. Approve generated install commands before they run.
Instructions
Install a GitHub repo, usually one picked with find_tools, as a tool on the user's computer: Legwork scans its source for hidden payloads, then builds and self-tests it in a sandbox. Grants are read-only folders and/or network, within the limits the user started Legwork with; ask only for what the task needs. Waits up to 45 seconds; if the build is still running it says so, and install_status follows it. For a repo not in the Legwork cache, a model writes the install command, and the build stops to show it before any of it runs: approve it by calling install_tool again with install_command. A repo already installed with the same grants is reused, not rebuilt. Replies with the new tools' names and how to call them.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo": "<repo>"
},
"name": "install_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | owner/repo (or its GitHub URL), e.g. 'jsvine/pdfplumber' | |
| commit | No | optional: a full 40-character commit SHA or a tag (e.g. v1.2.0) to build exactly that, instead of the default branch as it is now | |
| preview | No | true: install nothing; say which commit would be built and how it would be installed, so the user can approve that exact commit | |
| allow_net | No | whether the tool may use the internet while it runs (installs always can). Omitted: keeps an earlier grant, or no | |
| allow_read | No | folders the tool may read, read-only, e.g. ['~/Downloads']. Omitted: keeps what an earlier install of this repo was granted, or none | |
| install_command | No | only when a build is waiting for approval: the exact install command it showed, to run it once the user approves; "" declines it. Anything else runs nothing |