linear_getLabels
Retrieve issue labels from Linear project management system to organize and categorize tasks for better workflow management.
Instructions
Get a list of issue labels from Linear
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler function for the 'linear_getLabels' tool. It wraps the LinearService.getLabels() call in an async function, handling errors with logging.export function handleGetLabels(linearService: LinearService) { return async (args: unknown) => { try { return await linearService.getLabels(); } catch (error) { logError('Error getting labels', error); throw error; } }; }
- The MCPToolDefinition for 'linear_getLabels', including name, description, empty input schema, and output schema defining array of label objects with id, name, description, color, and team.export const getLabelsToolDefinition: MCPToolDefinition = { name: 'linear_getLabels', description: 'Get a list of issue labels from Linear', input_schema: { type: 'object', properties: {}, }, output_schema: { type: 'array', items: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, description: { type: 'string' }, color: { type: 'string' }, team: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, }, }, }, }, }, };
- src/tools/handlers/index.ts:70-70 (registration)Registration of the 'linear_getLabels' tool handler in the registerToolHandlers function, mapping it to handleGetLabels(linearService).linear_getLabels: handleGetLabels(linearService),
- src/tools/handlers/index.ts:37-37 (registration)Import of the handleGetLabels function from './user-handlers.js' used for registration.handleGetLabels,