Skip to main content
Glama
zalab-inc
by zalab-inc

get_profile

Retrieve the current user's profile information from Linear to access personal details and account settings within the project management platform.

Instructions

A tool that gets the current user's profile from Linear

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the get_profile tool. It fetches the current user's profile from Linear using linearClient.viewer, processes it into a UserProfile object, formats it into human-readable text, and returns it as MCP content. Includes error handling.
    handler: async () => {
      try {
        // Get user profile data
        const profile = await linearClient.viewer;
        
        if (!profile) {
          return {
            content: [{
              type: "text",
              text: "Unable to retrieve user profile. Please check your connection to Linear.",
            }],
          };
        }
        
        // Convert to UserProfile format for safe processing
        const userProfile: UserProfile = {
          id: profile.id || "unknown-id",
          name: profile.name || "No Name",
          displayName: profile.displayName,
          email: profile.email,
          active: profile.active,
          admin: profile.admin,
          guest: profile.guest,
          createdAt: profile.createdAt,
          updatedAt: profile.updatedAt,
          lastSeen: profile.lastSeen,
          timezone: profile.timezone,
          createdIssueCount: profile.createdIssueCount,
          avatarBackgroundColor: profile.avatarBackgroundColor,
          url: profile.url,
          isMe: profile.isMe
        };
        
        // Format profile to human-readable text
        const formattedText = formatProfileToHumanReadable(userProfile);
        
        // Return formatted text
        return {
          content: [{
            type: "text",
            text: formattedText,
          }],
        };
      } catch (error) {
        // Handle errors gracefully
        const errorMessage = error instanceof Error ? error.message : "Unknown error";
        return {
          content: [{
            type: "text",
            text: `An error occurred while retrieving profile data:\n${errorMessage}`,
          }],
        };
      }
    }
  • TypeScript interface defining the structure of the user profile data used within the tool handler.
    interface UserProfile {
      id: string;
      name: string;
      displayName?: string;
      email?: string;
      active?: boolean;
      admin?: boolean;
      guest?: boolean;
      createdAt?: string | Date;
      updatedAt?: string | Date;
      lastSeen?: string | Date;
      timezone?: string;
      createdIssueCount?: number;
      avatarBackgroundColor?: string;
      url?: string;
      isMe?: boolean;
    }
  • src/index.ts:31-41 (registration)
    The get_profile tool (LinearGetProfileTool) is registered to the MCP server using registerTool, alongside other Linear tools.
    registerTool(server, [
      LinearSearchIssuesTool,
      LinearGetProfileTool,
      LinearCreateIssueTool,
      LinearCreateCommentTool,
      LinearUpdateCommentTool,
      LinearGetIssueTool,
      LinearGetTeamIdTool,
      LinearUpdateIssueTool,
      LinearGetCommentTool,
    ]);
  • Helper function that converts UserProfile data into a formatted, human-readable multi-line string.
    function formatProfileToHumanReadable(profile: UserProfile): string {
      if (!profile || !profile.id) {
        return "Invalid or incomplete profile data";
      }
    
      let result = `User ID: ${profile.id}\n`;
      result += `Name: ${safeText(profile.name)}\n`;
      
      if (profile.displayName) {
        result += `Display name: ${safeText(profile.displayName)}\n`;
      }
      
      if (profile.email) {
        result += `Email: ${safeText(profile.email)}\n`;
      }
      
      result += `Status: ${profile.active ? "Active" : "Inactive"}\n`;
      result += `Admin: ${profile.admin ? "Yes" : "No"}\n`;
      result += `Guest: ${profile.guest ? "Yes" : "No"}\n`;
      
      if (profile.createdAt) {
        result += `Created at: ${formatDate(profile.createdAt)}\n`;
      }
      
      if (profile.lastSeen) {
        result += `Last seen: ${formatDate(profile.lastSeen)}\n`;
      }
      
      if (profile.timezone) {
        result += `Timezone: ${safeText(profile.timezone)}\n`;
      }
      
      if (profile.createdIssueCount !== undefined) {
        result += `Issues created: ${profile.createdIssueCount}\n`;
      }
      
      if (profile.url) {
        result += `URL: ${safeText(profile.url)}\n`;
      }
      
      return result;
    }
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 the tool retrieves the current user's profile but doesn't cover aspects like authentication requirements, rate limits, error handling, or the response format. This leaves significant gaps in understanding how the tool behaves in practice.

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, efficient sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and wastes no space, making it easy for an agent to parse quickly.

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 for a tool that likely involves authentication and returns user data. It doesn't explain what the profile contains, how errors are handled, or any dependencies, leaving the agent with insufficient context to use the tool 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 tool has 0 parameters, and schema description coverage is 100%, meaning there are no parameters to document. The description doesn't need to add parameter semantics, so a baseline of 4 is appropriate, as it avoids redundancy while clearly indicating no inputs are required.

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 action ('gets') and resource ('current user's profile from Linear'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_team_id' or 'get_issue', which also retrieve data from Linear but target different resources, so it misses the highest score.

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. It doesn't mention prerequisites, such as authentication, or compare it to sibling tools like 'get_team_id' for team-related data, leaving the agent to infer usage context without explicit direction.

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/zalab-inc/mcp-linear-app'

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