Skip to main content
Glama

get_my_work_summary

Retrieve a summary of your Jira issues updated, commented on, or transitioned within a specified date range to track work activity.

Instructions

Get a summary of issues the CURRENT_USER has worked on (updated, commented, or transitioned) within a date range

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startDateYesStart date in YYYY-MM-DD format
endDateYesEnd date in YYYY-MM-DD format

Implementation Reference

  • MCP tool handler: validates date inputs, fetches work summary via getWorkSummary helper, formats JSON output, handles errors with structured response.
    async ({ startDate, endDate }) => { try { // Validate date format const dateRegex = /^\d{4}-\d{2}-\d{2}$/; if (!dateRegex.test(startDate)) { throw new Error('startDate must be in YYYY-MM-DD format'); } if (!dateRegex.test(endDate)) { throw new Error('endDate must be in YYYY-MM-DD format'); } const issues = await getWorkSummary(CURRENT_USER, startDate, endDate); 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, }; } }
  • Input schema requires startDate/endDate strings; output schema defines issues array or error object using Zod.
    { title: 'Get My Work Summary', description: 'Get a summary of issues the CURRENT_USER has worked on (updated, commented, or transitioned) within a date range', inputSchema: { startDate: z.string().describe('Start date in YYYY-MM-DD format'), endDate: z.string().describe('End date in YYYY-MM-DD format'), }, outputSchema: { issues: z.array(z.object({ key: z.string(), summary: z.string(), status: z.string(), lastActivityType: z.string(), })).optional(), error: z.object({ message: z.string(), statusCode: z.number().optional(), details: z.unknown().optional(), }).optional(), }, },
  • src/index.ts:171-220 (registration)
    Full registration of get_my_work_summary tool with MCP server including name, schema, and handler function.
    server.registerTool( 'get_my_work_summary', { title: 'Get My Work Summary', description: 'Get a summary of issues the CURRENT_USER has worked on (updated, commented, or transitioned) within a date range', inputSchema: { startDate: z.string().describe('Start date in YYYY-MM-DD format'), endDate: z.string().describe('End date in YYYY-MM-DD format'), }, outputSchema: { issues: z.array(z.object({ key: z.string(), summary: z.string(), status: z.string(), lastActivityType: z.string(), })).optional(), error: z.object({ message: z.string(), statusCode: z.number().optional(), details: z.unknown().optional(), }).optional(), }, }, async ({ startDate, endDate }) => { try { // Validate date format const dateRegex = /^\d{4}-\d{2}-\d{2}$/; if (!dateRegex.test(startDate)) { throw new Error('startDate must be in YYYY-MM-DD format'); } if (!dateRegex.test(endDate)) { throw new Error('endDate must be in YYYY-MM-DD format'); } const issues = await getWorkSummary(CURRENT_USER, startDate, endDate); 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, }; } } );
  • Helper function implementing core logic: builds JQL for user activity in date range, searches issues, maps to summary format.
    export async function getWorkSummary( username: string, startDate: string, endDate: string ): Promise<WorkSummaryItem[]> { // JQL to find issues where the user was involved (assignee, reporter, commenter, or updated) const jql = `(assignee = "${username}" OR reporter = "${username}" OR "comment author" = "${username}") AND updated >= "${startDate}" AND updated <= "${endDate}" ORDER BY updated DESC`; const issues = await searchIssues(jql, ['summary', 'status', 'priority', 'updated']); return issues.map((issue) => ({ key: issue.key, summary: issue.summary, status: issue.status, lastActivityType: 'updated', // Simplified - could be enhanced with changelog API })); }
  • TypeScript interface defining the structure of work summary items returned by getWorkSummary.
    export interface WorkSummaryItem { key: string; summary: string; status: string; lastActivityType: string; }

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/eh24905-wiz/jira-mcp'

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