gitlab_get_project
Retrieve detailed information about a specific GitLab project by providing its ID or URL-encoded path. Ideal for managing repositories and CI/CD pipelines efficiently.
Instructions
Get details of a specific GitLab project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The ID or URL-encoded path of the project |
Input Schema (JSON Schema)
{
"properties": {
"project_id": {
"description": "The ID or URL-encoded path of the project",
"type": "string"
}
},
"required": [
"project_id"
],
"type": "object"
}
Implementation Reference
- The handler function that implements the core logic of the gitlab_get_project tool by calling the GitLab API to retrieve project details./** * Get project details handler */ export const getProject: ToolHandler = async (params, context) => { const { project_id } = params.arguments || {}; if (!project_id) { throw new McpError(ErrorCode.InvalidParams, 'project_id is required'); } const response = await context.axiosInstance.get(`/projects/${encodeURIComponent(String(project_id))}`); return formatResponse(response.data); };
- src/utils/tools-data.ts:32-45 (schema)Defines the input schema and description for the gitlab_get_project tool.{ name: 'gitlab_get_project', description: 'Get details of a specific GitLab project', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'The ID or URL-encoded path of the project' } }, required: ['project_id'] } },
- src/utils/tool-registry.ts:25-25 (registration)Registers the 'gitlab_get_project' tool name mapped to the repoHandlers.getProject handler function in the tool registry.gitlab_get_project: repoHandlers.getProject,
- src/utils/tool-registry.ts:8-8 (registration)Imports the repository handlers module containing the getProject function.import * as repoHandlers from "../handlers/repository-handlers.js";