feat: add topic parameter to list_projects and list_group_projects#418
Open
paolomainardi wants to merge 1 commit intozereight:mainfrom
Open
feat: add topic parameter to list_projects and list_group_projects#418paolomainardi wants to merge 1 commit intozereight:mainfrom
paolomainardi wants to merge 1 commit intozereight:mainfrom
Conversation
Add optional `topic` filter to ListProjectsSchema and ListGroupProjectsSchema, allowing callers to discover projects by GitLab topic tag (e.g. `list_projects(topic: "mkdocs")`). The GitLab REST API already supports this parameter on both `GET /projects` and `GET /groups/:id/projects` — this change simply exposes it through the MCP tool schemas. Closes zereight#417 Signed-off-by: Paolo Mainardi <paolomainardi@gmail.com> Assisted-by: opencode/claude-opus-4.6
42f207d to
736c4a0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes GitLab’s existing topic filter on project listing endpoints by adding an optional topic parameter to the MCP tool schemas and wiring it into the group-projects listing URL builder.
Changes:
- Add optional
topictoListProjectsSchemaandListGroupProjectsSchema. - Append
topicas a query parameter inlistGroupProjects()when provided.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
schemas.ts |
Adds topic to the Zod schemas so the MCP tool inputs accept it. |
index.ts |
Appends topic to the GET /groups/:id/projects query string when present. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
topicparameter toListProjectsSchemaandListGroupProjectsSchemainschemas.tslistGroupProjects()inindex.ts(listProjects()already uses a generic loop that passes all schema fields through)topicon bothGET /projectsandGET /groups/:id/projects— this change simply exposes the existing API capability through the MCP toolsMotivation
We tag internal documentation repositories with topics (e.g.
mkdocs) on GitLab and need AI agents to discover them vialist_projects(topic: "mkdocs"). Currently the only workaround isexecute_graphql, which is heavier and harder to guide agents toward safely.Closes #417
Changes
schemas.ts— 2 lines added:index.ts— 1 line added inlistGroupProjects():Testing
npm run buildpasses (TypeScript compiles cleanly)topicis optional and defaults to undefined