Skip to main content
Glama

jira_get_statuses

Retrieve Jira workflow statuses like To Do, In Progress, and Done for projects or issue types to understand available transitions and categories.

Instructions

Retrieves available statuses (global or project-specific, e.g., To Do, In Progress, Done). Returns status categories and workflow information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueTypeIdNoIssue type ID to get statuses for specific issue type (requires projectKey)
projectKeyNoProject key to get statuses for specific project (optional)

Implementation Reference

  • The handleGetStatuses function that executes the tool logic: validates input using GetStatusesInputSchema, prepares parameters, calls the getStatuses API helper, formats the response, logs progress and results, and handles errors.
    export async function handleGetStatuses(input: unknown): Promise<McpToolResponse> { try { const validated = validateInput(GetStatusesInputSchema, input); if (validated.projectKey && validated.issueTypeId) { log.info( `Getting statuses for project ${validated.projectKey} and issue type ${validated.issueTypeId}...` ); } else if (validated.projectKey) { log.info(`Getting statuses for project ${validated.projectKey}...`); } else { log.info('Getting global statuses...'); } const getParams: any = {}; if (validated.projectKey !== undefined) getParams.projectKey = validated.projectKey; if (validated.issueTypeId !== undefined) getParams.issueTypeId = validated.issueTypeId; const statuses = await getStatuses(getParams); log.info(`Found ${statuses.length} status(es)`); return formatStatusesResponse(statuses); } catch (error) { log.error('Error in handleGetStatuses:', error); return handleError(error); } }
  • Zod input schema for the jira_get_statuses tool, defining optional projectKey and issueTypeId with validation and descriptions.
    export const GetStatusesInputSchema = z.object({ projectKey: z .string() .optional() .describe('Project key to get statuses for specific project') .refine((v) => (v ? isValidProjectKey(v) : true), 'Invalid project key format'), issueTypeId: z .string() .optional() .describe('Issue type ID to get statuses for specific issue type'), });
  • MCP Tool object definition for 'jira_get_statuses' including name, description, and input schema matching the Zod schema.
    export const getStatusesTool: Tool = { name: TOOL_NAMES.GET_STATUSES, description: 'Retrieves available statuses (global or project-specific, e.g., To Do, In Progress, Done). Returns status categories and workflow information.', inputSchema: { type: 'object', properties: { projectKey: { type: 'string', description: 'Project key to get statuses for specific project (optional)', }, issueTypeId: { type: 'string', description: 'Issue type ID to get statuses for specific issue type (requires projectKey)', }, }, required: [], }, };
  • src/tools/index.ts:9-9 (registration)
    Re-export of the getStatusesTool from the tools index file, allowing centralized import of all tools.
    export * from './get-statuses.js';
  • Constant definition for the tool name used in the tool registration.
    GET_STATUSES: 'jira_get_statuses',

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