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
| Name | Required | Description | Default |
|---|---|---|---|
| issueTypeId | No | Issue type ID to get statuses for specific issue type (requires projectKey) | |
| projectKey | No | Project key to get statuses for specific project (optional) |
Implementation Reference
- src/tools/get-statuses.ts:33-61 (handler)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); } }
- src/types/tools.ts:159-169 (schema)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'), });
- src/tools/get-statuses.ts:13-31 (registration)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';
- src/config/constants.ts:32-32 (helper)Constant definition for the tool name used in the tool registration.GET_STATUSES: 'jira_get_statuses',