linear_getViewer
Retrieve details about the currently authenticated Linear user to verify identity and access permissions for project management tasks.
Instructions
Get information about the currently authenticated user
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/handlers/user-handlers.ts:7-16 (handler)The main handler function for the linear_getViewer tool. It wraps the call to linearService.getUserInfo() with try-catch error handling and logging.
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 name, description, empty input schema, and detailed 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:54-54 (registration)Registration of the linear_getViewer tool handler within the registerToolHandlers function, mapping it to handleGetViewer(linearService).
linear_getViewer: handleGetViewer(linearService),