linear_getViewer
Retrieve information about the currently authenticated user in Linear to verify identity and access permissions for project management tasks.
Instructions
Get information about the currently authenticated user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/handlers/user-handlers.ts:7-16 (handler)The core handler function for the 'linear_getViewer' tool. It wraps the call to linearService.getUserInfo() with error handling.export function handleGetViewer(linearService: LinearService) { return async (args: unknown) => { try { return await linearService.getUserInfo(); } catch (error) { logError('Error getting viewer information', error); throw error; } }; }
- The MCPToolDefinition for 'linear_getViewer', specifying no input parameters and the expected output schema for viewer information.export const getViewerToolDefinition: MCPToolDefinition = { name: 'linear_getViewer', description: 'Get information about the currently authenticated user', input_schema: { type: 'object', properties: {}, }, output_schema: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, email: { type: 'string' }, active: { type: 'boolean' }, displayName: { type: 'string' }, organization: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, }, }, }, }, };
- src/tools/handlers/index.ts:66-70 (registration)Registration of the 'linear_getViewer' handler within the registerToolHandlers function, mapping the tool name to the handler.// User tools linear_getViewer: handleGetViewer(linearService), linear_getOrganization: handleGetOrganization(linearService), linear_getUsers: handleGetUsers(linearService), linear_getLabels: handleGetLabels(linearService),