Skip to main content
Glama
Dsazz

JIRA MCP Server

jira_get_current_user

Retrieve your current JIRA user profile and permissions to verify access rights and configure integrations within the Cursor IDE.

Instructions

Get current user profile information and permissions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • GetCurrentUserHandler class that implements the core execution logic for the jira_get_current_user tool. Calls the use case to fetch user data and formats the response using UserProfileFormatter.
    export class GetCurrentUserHandler extends BaseToolHandler<
      Record<string, never>,
      string
    > {
      private formatter: UserProfileFormatter;
    
      /**
       * Create a new GetCurrentUserHandler with use case
       *
       * @param getCurrentUserUseCase - Use case for retrieving current user profile
       */
      constructor(private readonly getCurrentUserUseCase: GetCurrentUserUseCase) {
        super("JIRA", "Get Current User");
        this.formatter = new UserProfileFormatter();
      }
    
      /**
       * Execute the handler logic
       * Retrieves current user profile and formats it
       */
      protected async execute(): Promise<string> {
        try {
          this.logger.info("Getting current user profile");
    
          // Get current user using use case
          const response = await this.getCurrentUserUseCase.execute();
    
          // Format user profile using the formatter
          return this.formatter.format(response.user);
        } catch (error) {
          this.logger.error(`Failed to get current user: ${error}`);
          throw this.enhanceError(error);
        }
      }
    
      /**
       * Enhance error messages for better user guidance
       */
      private enhanceError(error: unknown): Error {
        if (error instanceof JiraPermissionError) {
          return new Error(
            "❌ **Permission Denied**\n\nYou don't have permission to access user profile information.\n\n**Solutions:**\n- Check your JIRA authentication\n- Verify your API token is valid\n- Contact your JIRA administrator\n\n**Required Permissions:** Valid JIRA authentication",
          );
        }
    
        if (error instanceof JiraApiError) {
          return new Error(
            `❌ **JIRA API Error**\n\n${error.message}\n\n**Solutions:**\n- Check your JIRA connection\n- Verify your authentication credentials\n- Try again in a few moments\n\n**Example:** \`jira_get_current_user\``,
          );
        }
    
        if (error instanceof Error) {
          return new Error(
            `❌ **User Profile Retrieval Failed**\n\n${error.message}\n\n**Solutions:**\n- Check your JIRA connection\n- Verify your authentication\n- Try again in a few moments\n\n**Example:** \`jira_get_current_user\``,
          );
        }
    
        return new Error(
          "❌ **Unknown Error**\n\nAn unknown error occurred during user profile retrieval.\n\nPlease check your connection and try again.",
        );
      }
    }
  • Factory function creates the jira_get_current_user tool handler object by wrapping the GetCurrentUserHandler's handle method.
    return {
      jira_get_current_user: {
        handle: async (args: unknown) => getCurrentUserHandler.handle(args),
      },
    };
  • ToolConfig object defining the name, description, input schema (empty params), and handler binding for registration.
    {
      name: "jira_get_current_user",
      description: "Get current user profile information and permissions",
      params: {},
      handler: tools.jira_get_current_user.handle.bind(tools.jira_get_current_user),
    },
  • Configuration group for user tools passed to registry, which calls server.tool() to register with MCP server.
    configs: createUserToolsConfig({
      jira_get_current_user: tools.jira_get_current_user,
    }),
  • TypeScript interface definition for the jira_get_current_user tool handler in JiraTools interface.
      jira_get_current_user: ToolHandler;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but lacks details on authentication requirements, rate limits, error handling, or response format. For a tool that likely requires user context, this is insufficient, though it doesn't contradict any annotations.

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 that directly states the tool's purpose without any fluff. It is front-loaded and efficiently communicates the core function, making it highly concise and well-structured.

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

Completeness3/5

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

Given the tool has 0 parameters, no annotations, and no output schema, the description is minimally adequate by stating what it retrieves. However, it lacks details on the return value structure or behavioral aspects, leaving gaps for an agent to understand full usage. It meets the basic requirement but could be more informative.

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 discuss parameters, earning a baseline of 4 for not adding unnecessary information. It doesn't reach 5 as it could have mentioned implicit context like authentication.

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 the resource 'current user profile information and permissions', making the purpose specific and understandable. It distinguishes from siblings like jira_get_assigned_issues or jira_get_projects by focusing on user-specific data. However, it doesn't explicitly contrast with all siblings, keeping it at 4 instead of 5.

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 scenarios like checking user permissions before performing actions with other tools (e.g., jira_create_issue) or prerequisites. This lack of context leaves the agent without usage 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/Dsazz/mcp-jira'

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