get_my_issues
Retrieve all Jira issues currently assigned to you. View your assigned tasks and track work progress directly from the Jira MCP Server.
Instructions
Get all issues currently assigned to the configured CURRENT_USER
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:93-110 (handler)The handler function for the 'get_my_issues' tool. It constructs a JQL query for issues assigned to the current user (excluding 'Done' status), fetches them using the searchIssues helper, and returns formatted output or error.async () => { try { const jql = `assignee = ${CURRENT_USER} AND status != Done ORDER BY updated DESC`; const issues = await searchIssues(jql); const output = { issues }; return { content: [{ type: 'text', text: JSON.stringify(output, null, 2) }], structuredContent: output, }; } catch (error) { const output = formatError(error); return { content: [{ type: 'text', text: JSON.stringify(output, null, 2) }], structuredContent: output, isError: true, }; } }
- src/index.ts:74-92 (schema)Schema definition for the 'get_my_issues' tool, including empty input schema and output schema for issues list or error.{ title: 'Get My Issues', description: 'Get all issues currently assigned to the configured CURRENT_USER', inputSchema: {}, outputSchema: { issues: z.array(z.object({ key: z.string(), summary: z.string(), status: z.string(), priority: z.string(), updated: z.string(), })).optional(), error: z.object({ message: z.string(), statusCode: z.number().optional(), details: z.unknown().optional(), }).optional(), }, },
- src/index.ts:72-111 (registration)Registration of the 'get_my_issues' tool using server.registerTool, including schema and inline handler function.server.registerTool( 'get_my_issues', { title: 'Get My Issues', description: 'Get all issues currently assigned to the configured CURRENT_USER', inputSchema: {}, outputSchema: { issues: z.array(z.object({ key: z.string(), summary: z.string(), status: z.string(), priority: z.string(), updated: z.string(), })).optional(), error: z.object({ message: z.string(), statusCode: z.number().optional(), details: z.unknown().optional(), }).optional(), }, }, async () => { try { const jql = `assignee = ${CURRENT_USER} AND status != Done ORDER BY updated DESC`; const issues = await searchIssues(jql); const output = { issues }; return { content: [{ type: 'text', text: JSON.stringify(output, null, 2) }], structuredContent: output, }; } catch (error) { const output = formatError(error); return { content: [{ type: 'text', text: JSON.stringify(output, null, 2) }], structuredContent: output, isError: true, }; } } );
- src/index.ts:48-64 (helper)Helper function formatError used in the tool handler for structuring error responses.function formatError(error: unknown): { error: { message: string; statusCode?: number; details?: unknown } } { if (typeof error === 'object' && error !== null && 'statusCode' in error) { const apiError = error as JiraApiError; return { error: { message: apiError.message, statusCode: apiError.statusCode, details: apiError.errors, }, }; } return { error: { message: error instanceof Error ? error.message : String(error), }, }; }