Register a repository
add_repoRegister a GitLab project for read-only access, using either an existing local clone or a server-side mirror; invalid paths are rejected and re-registration updates settings.
Instructions
Register a project with this server. With local_path, reads use that existing clone instead of a server-side mirror; the path is checked to be a git repository here, so a wrong path is refused now rather than at read time. Without it, the project is registered as mirror-backed, which also makes it appear in list_repos before it has ever been read. Nothing is cloned or fetched: use sync_repo for that, or simply read the project. A project already registered is updated; its freshness policy is kept.
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": "add_repo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | GitLab project path, e.g. 'group/subgroup/repo'. Defaults to GITLAB_DEFAULT_PROJECT. | |
| local_path | No | Path to an existing clone (or bare repository) to read from instead of a mirror. |