linear_getProjectIssues
Retrieve all issues from a Linear project to track tasks, identify blockers, and monitor progress. Specify a project ID to get relevant issues with optional limit control.
Instructions
Get all issues associated with a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ID of the project to get issues for | |
| limit | No | Maximum number of issues to return (default: 25) |
Implementation Reference
- The handler function that implements the core logic of the linear_getProjectIssues tool. It validates the input arguments using a type guard and delegates to the LinearService.getProjectIssues method./** * Handler for getting issues in a project */ export 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; } }; }
- The MCP tool definition (schema) for linear_getProjectIssues, specifying input parameters (projectId required, optional limit) and output structure (array of issue objects).export 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:81-84 (registration)Registration of the linear_getProjectIssues handler within the registerToolHandlers function, mapping the tool name to the handleGetProjectIssues factory.linear_updateProject: handleUpdateProject(linearService), linear_addIssueToProject: handleAddIssueToProject(linearService), linear_getProjectIssues: handleGetProjectIssues(linearService),
- src/tools/type-guards.ts:466-477 (helper)Type guard function used by the handler to validate input arguments for the linear_getProjectIssues tool.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') ); }