Skip to main content
Glama

get_jira_tickets

Retrieve Jira tickets for CV/resume building by fetching user-assigned or created tickets with time range and status filters.

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 that implements the get_jira_tickets tool. It queries the Jira API using JQL for tickets assigned to the user with the specified status and since date, formats the results, and returns them as TextContent.
    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)}")]
  • Registration of the get_jira_tickets tool in the list_tools() function, including name, description, and input schema.
    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 definition for the get_jira_tickets tool, specifying parameters 'since' and 'status'.
    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" } }
  • Dispatch logic in the call_tool() handler that invokes the get_jira_tickets function with parsed arguments.
    elif name == "get_jira_tickets": return await get_jira_tickets( arguments.get("since", "6 months ago"), arguments.get("status", "Done") )
  • Usage of get_jira_tickets within the generate_enhanced_cv tool to fetch Jira data.
    jira_result = await get_jira_tickets(since, "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