Skip to main content
Glama

jira_get_priorities

Retrieve Jira issue priorities including IDs, names, and descriptions to properly categorize and manage task urgency levels.

Instructions

Retrieves available priorities (e.g., Highest, High, Medium, Low, Lowest). Returns IDs, names, and descriptions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that implements the core logic for the 'jira_get_priorities' tool. It validates the input, fetches priorities using the API helper, formats the response, logs activity, and handles any errors.
    export async function handleGetPriorities(input: unknown): Promise<McpToolResponse> { try { validateInput(GetPrioritiesInputSchema, input); log.info('Getting all priority levels...'); const priorities = await getPriorities(); log.info(`Found ${priorities.length} priority level(s)`); return formatPrioritiesResponse(priorities); } catch (error) { log.error('Error in handleGetPriorities:', error); return handleError(error); } }
  • Supporting API helper function that performs the actual HTTP GET request to Jira's /priority endpoint to retrieve the list of priorities.
    export async function getPriorities(): Promise<JiraPriority[]> { const config: AxiosRequestConfig = { method: 'GET', url: '/priority', }; return await makeJiraRequest<JiraPriority[]>(config); }
  • Zod schema defining the input for the tool (empty object since no input parameters are required). Used for runtime validation in the handler.
    export const GetPrioritiesInputSchema = z.object({}); export type GetPrioritiesInput = z.infer<typeof GetPrioritiesInputSchema>;
  • src/index.ts:32-49 (registration)
    Registers the handler function for 'jira_get_priorities' (TOOL_NAMES.GET_PRIORITIES) in the toolHandlers Map, which is used by the MCP server to dispatch CallTool requests to the correct handler.
    const toolHandlers = new Map<string, (input: unknown) => Promise<any>>([ [TOOL_NAMES.GET_VISIBLE_PROJECTS, tools.handleGetVisibleProjects], [TOOL_NAMES.GET_ISSUE, tools.handleGetIssue], [TOOL_NAMES.SEARCH_ISSUES, tools.handleSearchIssues], [TOOL_NAMES.GET_MY_ISSUES, tools.handleGetMyIssues], [TOOL_NAMES.GET_ISSUE_TYPES, tools.handleGetIssueTypes], [TOOL_NAMES.GET_USERS, tools.handleGetUsers], [TOOL_NAMES.GET_PRIORITIES, tools.handleGetPriorities], [TOOL_NAMES.GET_STATUSES, tools.handleGetStatuses], [TOOL_NAMES.CREATE_ISSUE, tools.handleCreateIssue], [TOOL_NAMES.UPDATE_ISSUE, tools.handleUpdateIssue], [TOOL_NAMES.ADD_COMMENT, tools.handleAddComment], [TOOL_NAMES.GET_PROJECT_INFO, tools.handleGetProjectInfo], [TOOL_NAMES.CREATE_SUBTASK, tools.handleCreateSubtask], [TOOL_NAMES.GET_CREATE_META, tools.handleGetCreateMeta], [TOOL_NAMES.GET_CUSTOM_FIELDS, tools.handleGetCustomFields], [TOOL_NAMES.CREATE_ISSUE_LINK, tools.handleCreateIssueLink], ]);
  • src/index.ts:52-69 (registration)
    Includes the getPrioritiesTool definition in the allTools array, which is returned by the MCP server's ListTools request.
    const allTools = [ tools.getVisibleProjectsTool, tools.getIssueTool, tools.searchIssuesTool, tools.getMyIssuesTool, tools.getIssueTypesTool, tools.getUsersTool, tools.getPrioritiesTool, tools.getStatusesTool, tools.createIssueTool, tools.updateIssueTool, tools.addCommentTool, tools.getProjectInfoTool, tools.createSubtaskTool, tools.getCreateMetaTool, tools.getCustomFieldsTool, tools.createIssueLinkTool, ];

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/freema/mcp-jira-stdio'

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