Skip to main content
Glama

get_jira_tickets

Retrieve Jira tickets for CV/resume creation, filtering by time range and status to document work history and project contributions.

Instructions

Get Jira tickets assigned to or created by user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNoTime range for tickets6 months ago
statusNoTicket status to filterDone

Implementation Reference

  • The main handler function for the 'get_jira_tickets' tool. Fetches Jira tickets using the REST API with JQL query filtered by assignee, status, and date range. Formats results as markdown list.
    async def get_jira_tickets(since: str, status: str) -> list[TextContent]: """Get Jira tickets.""" if not all([JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN]): return [TextContent( type="text", text="Jira credentials not configured. Set JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN" )] try: # Parse date since_date = parse_time_range(since) date_str = since_date.strftime("%Y-%m-%d") # Build JQL query jql = f'assignee = "{JIRA_USER or JIRA_EMAIL}" AND status = "{status}" AND updated >= "{date_str}" ORDER BY updated DESC' # Create auth header auth_string = f"{JIRA_EMAIL}:{JIRA_API_TOKEN}" auth_bytes = auth_string.encode('ascii') auth_b64 = base64.b64encode(auth_bytes).decode('ascii') # Make request async with httpx.AsyncClient() as client: response = await client.get( f"{JIRA_URL}/rest/api/3/search", params={"jql": jql, "maxResults": 100}, headers={ "Authorization": f"Basic {auth_b64}", "Accept": "application/json" }, timeout=30.0 ) response.raise_for_status() data = response.json() # Format tickets tickets = [] for issue in data.get("issues", []): key = issue["key"] summary = issue["fields"]["summary"] issue_type = issue["fields"]["issuetype"]["name"] status = issue["fields"]["status"]["name"] tickets.append(f"{key} - {summary} [{issue_type}] ({status})") output = "\n".join(tickets) if tickets else "No tickets found" return [TextContent( type="text", text=f"Jira Tickets ({len(tickets)}):\n\n{output}" )] except Exception as e: return [TextContent(type="text", text=f"Jira API Error: {str(e)}")]
  • Registers the tool with the MCP server in list_tools(). Includes name, description, and input schema defining 'since' (time range, default '6 months ago') and 'status' (default 'Done') parameters.
    Tool( name="get_jira_tickets", description="Get Jira tickets assigned to or created by user", inputSchema={ "type": "object", "properties": { "since": { "type": "string", "description": "Time range for tickets", "default": "6 months ago" }, "status": { "type": "string", "description": "Ticket status to filter", "default": "Done" } } } ),
  • Input schema for the tool, specifying object with optional 'since' and 'status' string parameters.
    inputSchema={ "type": "object", "properties": { "since": { "type": "string", "description": "Time range for tickets", "default": "6 months ago" }, "status": { "type": "string", "description": "Ticket status to filter", "default": "Done" } } } ),
  • Dispatcher in @app.call_tool() that routes calls to the get_jira_tickets handler with default parameters.
    elif name == "get_jira_tickets": return await get_jira_tickets( arguments.get("since", "6 months ago"), arguments.get("status", "Done") )

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/eyaab/cv-resume-builder-mcp'

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