Install a userscript into Tampermonkey
browser_tampermonkey_installInstalls or updates a Tampermonkey userscript from source code or a .user.js URL, deduplicating by @name so an existing script is updated instead of duplicated.
Instructions
Install (or update) a userscript by handing its source to Tampermonkey saveScript. Pass code for a whole userscript, or url to fetch one over HTTP first. De-duplicates by the @name header: an existing script with that name is updated instead of duplicated, because MEASURED saveScript creates a NEW script for every new uuid. Returns the assigned uuid.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browser_tampermonkey_install"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Alternatively, an http(s) URL to a .user.js | |
| code | No | Full userscript source, including the ==UserScript== header | |
| force | No | Install even when the name already exists (creates a duplicate) |