add_project
Register a new project directory by specifying its name and path to allow OpenCode to handle coding tasks within that project.
Instructions
Register a new project directory.
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": {
"name": "<name>",
"path": "<path>"
},
"name": "add_project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Execution mode (default: spawn) | |
| name | Yes | Project name (alias) | |
| path | Yes | Absolute path to project directory | |
| port | No | Port for persistent mode |