search_issues
Search for issues in a GitLab project using filters like state, labels, and keywords to find relevant tickets and track project tasks.
Instructions
Search for issues in a GitLab project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID or URL-encoded path | |
| search | Yes | Search term for title and description | |
| state | No | Filter issues by state | |
| labels | No | Comma-separated list of label names | |
| page | No | Page number for pagination (default: 1) | |
| per_page | No | Number of results per page (default: 20) |
Implementation Reference
- src/api/issues.ts:129-147 (handler)Implementation of the search_issues tool handler.
export async function searchIssues( projectId: string, searchTerm: string, options: { state?: "opened" | "closed" | "all"; labels?: string; page?: number; per_page?: number; } = {} ): Promise<GitLabIssue[]> { if (!searchTerm?.trim()) { throw new Error("Search term is required"); } return listIssues(projectId, { search: searchTerm, ...options }); }