Skip to main content
Glama
magarcia

Linear MCP Server

linear_get_viewer

Retrieve authenticated user information from Linear's issue tracking system to identify the current user account and access permissions.

Instructions

Get information about the authenticated user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that retrieves the authenticated Linear user (viewer) information using linearClient.viewer, extracts relevant fields, and returns it as JSON string in the tool response format. Handles errors appropriately.
    export const linearGetViewerHandler: ToolHandler = async () => {
      try {
        // Get the authenticated user (viewer)
        const viewer = await linearClient.viewer;
        if (!viewer) {
          return {
            content: [
              {
                type: 'text',
                text: 'Error: Failed to get authenticated user',
              },
            ],
            isError: true,
          };
        }
    
        // Extract user data
        const userData = {
          id: await viewer.id,
          name: await viewer.name,
          displayName: await viewer.displayName,
          email: await viewer.email,
          active: await viewer.active,
          admin: await viewer.admin,
          avatarUrl: await viewer.avatarUrl,
          url: await viewer.url,
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(userData),
            },
          ],
        };
      } catch (error) {
        const errorMessage =
          error instanceof Error
            ? error.message
            : typeof error === 'string'
              ? error
              : 'Unknown error occurred';
    
        return {
          content: [
            {
              type: 'text',
              text: `Error: ${errorMessage}`,
            },
          ],
          isError: true,
        };
      }
    };
  • Registers the 'linear_get_viewer' tool using registerTool, providing name, description, empty input schema (no parameters needed), and links to the linearGetViewerHandler.
    export const linearGetViewerTool = registerTool(
      {
        name: 'linear_get_viewer',
        description: 'Get information about the authenticated user',
        inputSchema: {
          type: 'object',
          properties: {},
        },
      },
      linearGetViewerHandler
    );
  • Input schema for the tool: an empty object schema since the tool takes no input parameters.
    inputSchema: {
      type: 'object',
      properties: {},
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it 'gets information' but doesn't specify what type of information (e.g., profile details, permissions), whether it requires authentication (implied by 'authenticated user' but not explicit), or any rate limits or error conditions. This leaves significant gaps for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded with the core purpose ('Get information about the authenticated user') and doesn't include extraneous details, making it highly efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what information is returned (e.g., user ID, name, email) or any behavioral aspects like authentication requirements. For a tool with no structured data to supplement it, this leaves the agent with insufficient context to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't mention parameters, which is correct for a parameterless tool. This meets the baseline of 4 for zero parameters, as it avoids unnecessary detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('information about the authenticated user'), making the purpose specific and understandable. However, it doesn't distinguish this from potential sibling tools like 'linear_get_user_issues' or 'linear_get_team' that might also involve user information, so it doesn't fully differentiate from all siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'linear_get_user_issues' that might retrieve user-related data, there's no indication of when this tool is preferred (e.g., for profile info vs. issue lists) or any prerequisites for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/magarcia/mcp-server-linearapp'

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