Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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' }, }, }, }, }, };
  • 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),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tacticlaunch/mcp-linear'

If you have feedback or need assistance with the MCP directory API, please join our Discord server