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; }

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