linear_getProjectIssues
Retrieve all issues linked to a Linear project by specifying the project ID and optional limit, enabling efficient project management and issue tracking.
Instructions
Get all issues associated with a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of issues to return (default: 25) | |
| projectId | Yes | ID of the project to get issues for |
Implementation Reference
- Handler function that validates input arguments using type guard and delegates to LinearService.getProjectIssuesexport function handleGetProjectIssues(linearService: LinearService) { return async (args: unknown) => { try { if (!isGetProjectIssuesArgs(args)) { throw new Error('Invalid arguments for getProjectIssues'); } return await linearService.getProjectIssues(args.projectId, args.limit); } catch (error) { logError('Error getting project issues', error); throw error; } }; }
- Tool definition including input and output schemas for linear_getProjectIssuesexport const getProjectIssuesToolDefinition: MCPToolDefinition = { name: 'linear_getProjectIssues', description: 'Get all issues associated with a project', input_schema: { type: 'object', properties: { projectId: { type: 'string', description: 'ID of the project to get issues for', }, limit: { type: 'number', description: 'Maximum number of issues to return (default: 25)', }, }, required: ['projectId'], }, output_schema: { type: 'array', items: { type: 'object', properties: { id: { type: 'string' }, identifier: { type: 'string' }, title: { type: 'string' }, description: { type: 'string' }, state: { type: 'string' }, priority: { type: 'number' }, team: { type: 'object' }, assignee: { type: 'object' }, url: { type: 'string' }, }, }, }, };
- src/tools/handlers/index.ts:83-83 (registration)Registration of the tool handler in the registerToolHandlers functionlinear_getProjectIssues: handleGetProjectIssues(linearService),
- src/tools/type-guards.ts:464-477 (helper)Type guard function for validating input arguments of linear_getProjectIssues* Type guard for linear_getProjectIssues tool arguments */ export function isGetProjectIssuesArgs(args: unknown): args is { projectId: string; limit?: number; } { return ( typeof args === 'object' && args !== null && 'projectId' in args && typeof (args as { projectId: string }).projectId === 'string' && (!('limit' in args) || typeof (args as { limit: number }).limit === 'number') ); }