Skip to main content
Glama

gitlab_list_releases_since_version

Filter GitLab project releases from a specific version onward to track changes and updates in your development workflow.

Instructions

Filters releases for a given GitLab project since a specific version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYesThe name or partial name of the GitLab project.
sinceVersionYesThe version to filter releases since (e.g., "1.0.0").

Implementation Reference

  • Main handler for gitlab_list_releases_since_version tool. Resolves projectPath by fuzzy matching projectName, then calls service to filter releases since given version using semver comparison.
    case 'gitlab_list_releases_since_version': { if (!gitlabService) { throw new Error('GitLab service is not initialized.'); } const { projectName, sinceVersion } = args as { projectName: string; sinceVersion: string; }; const projects = await gitlabService.filterProjectsByName(projectName); if (projects.length === 0) { throw new Error(`No project found with name: ${projectName}`); } const projectPath = projects[0].path_with_namespace; const result = await gitlabService.filterReleasesSinceVersion( projectPath, sinceVersion, ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • src/index.ts:253-270 (registration)
    Tool registration in the allTools array, defining name, description, and inputSchema for gitlab_list_releases_since_version.
    name: 'gitlab_list_releases_since_version', description: 'Filters releases for a given GitLab project since a specific version.', inputSchema: { type: 'object', properties: { projectName: { type: 'string', description: 'The name or partial name of the GitLab project.', }, sinceVersion: { type: 'string', description: 'The version to filter releases since (e.g., "1.0.0").', }, }, required: ['projectName', 'sinceVersion'], }, },
  • Helper method in GitLabService that fetches all releases and filters those with tag_name >= sinceVersion using semver.gte.
    async filterReleasesSinceVersion( projectPath: string, sinceVersion: string, ): Promise<any[]> { const allReleases = await this.getReleases(projectPath); const semver = await import('semver'); return allReleases.filter((release) => { try { return semver.gte(release.tag_name, sinceVersion); } catch (error) { console.error( `Could not parse version ${release.tag_name} or ${sinceVersion}: ${error}`, ); return false; } }); }
  • Helper method in GitLabService to fuzzy match projects by name and return matching GitLabProject objects; used to resolve projectPath from projectName in the handler.
    async filterProjectsByName(projectName: string): Promise<GitLabProject[]> { const allProjects = await this.listProjects(); const lowerCaseProjectName = projectName.toLowerCase(); return allProjects.filter( (project) => project.name.toLowerCase().includes(lowerCaseProjectName) || project.name_with_namespace .toLowerCase() .includes(lowerCaseProjectName), ); }
  • Helper method in GitLabService to fetch all releases from GitLab API for a project; called by filterReleasesSinceVersion.
    async getReleases(projectPath: string): Promise<any[]> { const encodedProjectPath = encodeURIComponent(projectPath); return this.callGitLabApi<any[]>(`projects/${encodedProjectPath}/releases`); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HainanZhao/mcp-gitlab-jira'

If you have feedback or need assistance with the MCP directory API, please join our Discord server