gitlab_list_projects
Retrieve a list of GitLab projects accessible to the user, filtered by membership, ownership, or search criteria, and manage repository interactions efficiently.
Instructions
List GitLab projects accessible to the user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| membership | No | Limit to projects the current user is a member of | |
| owned | No | Limit to projects explicitly owned by the current user | |
| per_page | No | Number of projects to return per page (max 100) | |
| search | No | Search projects by name |
Implementation Reference
- The main handler function that implements the gitlab_list_projects tool logic, fetching projects from GitLab API endpoint '/projects' with optional search, owned, membership, and per_page filters.export const listProjects: ToolHandler = async (params, context) => { const { search, owned, membership, per_page } = params.arguments || {}; const response = await context.axiosInstance.get('/projects', { params: { search, owned: owned === true ? true : undefined, membership: membership === true ? true : undefined, per_page: per_page || 20 } }); return formatResponse(response.data); };
- src/utils/tools-data.ts:8-30 (schema)The input schema and metadata definition for the gitlab_list_projects tool.name: 'gitlab_list_projects', description: 'List GitLab projects accessible to the user', inputSchema: { type: 'object', properties: { search: { type: 'string', description: 'Search projects by name' }, owned: { type: 'boolean', description: 'Limit to projects explicitly owned by the current user' }, membership: { type: 'boolean', description: 'Limit to projects the current user is a member of' }, per_page: { type: 'number', description: 'Number of projects to return per page (max 100)' } } }
- src/utils/tool-registry.ts:24-24 (registration)The registration of the gitlab_list_projects tool in the central toolRegistry, mapping the tool name to its handler function.gitlab_list_projects: repoHandlers.listProjects,