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")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'gets' tickets, implying a read operation, but doesn't disclose any behavioral traits such as authentication needs, rate limits, pagination, or what happens if no tickets are found. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Get Jira tickets assigned to or created by user'. It's front-loaded with the core purpose and has zero wasted words, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a read operation with filtering parameters), no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, usage context, and what the return values might be. For a tool with two parameters and no structured output, the description should provide more context to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear descriptions for both parameters ('since' and 'status'). The description doesn't add any meaning beyond what the schema provides, as it doesn't mention parameters at all. According to the rules, with high schema coverage (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get Jira tickets assigned to or created by user'. It specifies the verb ('Get') and resource ('Jira tickets'), and clarifies the scope (tickets related to the user). However, it doesn't explicitly differentiate from sibling tools, which are unrelated to Jira tickets (e.g., analyze_commits_impact, get_linkedin_profile), so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for usage, or exclusions. While sibling tools are unrelated, the description lacks any usage instructions, leaving the agent to infer based on the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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