Run an npm package script
run_npmExecute a script from package.json in your project. Auto-detects app root or set custom working directory, arguments, and timeout.
Instructions
Runs one script declared in package.json from an auto-detected or specified npm app root.
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": {
"project": "<project>",
"script": "<script>"
},
"name": "run_npm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional project-relative working directory. When omitted, the tool auto-detects the relevant app root. | |
| args | No | ||
| script | Yes | ||
| project | Yes | Project key from list_projects. | |
| timeoutSeconds | No |