list_issues
Fetch GitHub Kanban board issues by state or labels to streamline task management and enhance workflow automation through organized issue tracking.
Instructions
カンバンボードのissue一覧を取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| labels | No | フィルタリングするラベル | |
| path | No | Gitリポジトリの絶対パス | |
| state | No | issueの状態 |
Implementation Reference
- src/handlers/issue-handlers.ts:24-41 (handler)Main handler function that executes the list_issues tool logic using gh CLI to list issues with filters.export async function handleListIssues(args: IssueArgs): Promise<ToolResponse> { const { owner, repo } = await getRepoInfo(args); const stateFlag = args.state ? `--state ${args.state}` : ''; const labelsFlag = args.labels?.length ? `--label ${args.labels.join(',')}` : ''; const { stdout } = await execAsync( `gh issue list --repo ${owner}/${repo} ${stateFlag} ${labelsFlag} --json number,title,state,labels,assignees,createdAt,updatedAt` ); return { content: [ { type: 'text', text: stdout, }, ], }; }
- src/schemas/issue-schemas.ts:1-22 (schema)Input schema definition for the list_issues tool.export const listIssuesSchema = { type: 'object', properties: { path: { type: 'string', description: 'Gitリポジトリの絶対パス', }, state: { type: 'string', enum: ['open', 'closed', 'all'], description: 'issueの状態', }, labels: { type: 'array', items: { type: 'string', }, description: 'フィルタリングするラベル', }, }, required: [], };
- src/server.ts:42-45 (registration)Registration of the list_issues tool in the MCP server's tool list.name: 'list_issues', description: 'カンバンボードのissue一覧を取得します', inputSchema: listIssuesSchema, },
- src/handlers/tool-handlers.ts:41-46 (handler)Dispatcher case in tool-handlers that routes list_issues calls to the main handler.case 'list_issues': return await handleListIssues({ path: args.path as string, state: args?.state as 'open' | 'closed' | 'all', labels: args?.labels as string[], });