Discover Project
gitlab_discover_projectResolve a git remote URL to get GitLab project ID and metadata. Start workspace sessions by providing the project_id required by other GitLab tools. Extract the full URL from git remote -v, pass it as-is.
Instructions
Resolve a git remote URL to a GitLab project and return its project_id and metadata. Read-only; performs a lookup against the GitLab Projects API; no side effects.
When to use: at the start of a workspace session, to obtain the project_id required by most other gitlab_* tools. Extract the FULL remote URL from .git/config ([remote "origin"] url = ...) or from 'git remote -v'. NOT for: searching projects by name (use gitlab_search action=projects), listing a user's projects (use gitlab_project action=list_user_projects), verifying GitLab connectivity or authentication (use gitlab_server action=health_check).
IMPORTANT: pass the complete URL exactly as it appears — do NOT strip the git@ prefix from SSH URLs. Supported formats (a URL scheme or git@ user prefix is required):
HTTPS: https://gitlab.example.com/group/project.git
SSH shorthand: git@gitlab.example.com:group/project.git
SSH protocol: ssh://git@gitlab.example.com/group/project.git
Returns: {id, name, path, path_with_namespace, web_url, description, default_branch, visibility, http_url_to_repo, ssh_url_to_repo, extracted_path}. Errors: 404 not found (hint: project may be private — verify token permissions), 403 forbidden (hint: token lacks read_api scope).
See also: gitlab_project (full project CRUD/settings once id is known), gitlab_server (connectivity and version checks), gitlab_search (find projects by query).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| remote_url | Yes | Full git remote URL (HTTPS or SSH) exactly as shown in .git/config or 'git remote -v' output. IMPORTANT: pass the complete URL including the scheme (https://) or user prefix (git@). Examples: 'https://gitlab.example.com/group/project.git' or 'git@gitlab.example.com:group/project.git'. Do NOT strip the git@ prefix from SSH URLs.,required |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next_steps | No | ||
| id | Yes | ||
| name | Yes | ||
| path | Yes | ||
| path_with_namespace | Yes | ||
| web_url | Yes | ||
| default_branch | Yes | ||
| description | Yes | ||
| visibility | Yes | ||
| http_url_to_repo | No | ||
| ssh_url_to_repo | No | ||
| extracted_path | Yes |