use_package
Adds an R package dependency to the DESCRIPTION file, choosing Imports, Suggests, Depends, LinkingTo, or Enhances to keep package metadata correct.
Instructions
Add a package dependency to DESCRIPTION using usethis::use_package(). Supports Imports, Suggests, Depends, LinkingTo, and Enhances.
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": {
"package": "<package>",
"project_path": "<project_path>"
},
"name": "use_package"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Dependency type in DESCRIPTION (default 'Imports'). | Imports |
| package | Yes | Name of the R package to add as a dependency. | |
| project_path | Yes | Absolute path to the root of the R package. |