jira_search_issues
Search for Jira issues using JQL queries to find, filter, and retrieve specific tickets from your Jira projects.
Instructions
Search for Jira issues using JQL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jql | Yes | JQL query string | |
| max_results | No | Maximum number of results to return |
Implementation Reference
- src/jira_server.py:235-260 (handler)The main handler function for the jira_search_issues tool. It executes a JQL query against the Jira instance, retrieves issues, formats them into a structured list, and returns the JSON-serialized result.async def _search_issues(self, arguments: dict) -> List[TextContent]: """Search for Jira issues""" jql = arguments["jql"] max_results = arguments.get("max_results", 50) results = self.jira_client.jql(jql, limit=max_results) issues = results.get("issues", []) formatted_issues = [] for issue in issues: fields = issue.get("fields", {}) formatted_issues.append({ "key": issue["key"], "summary": fields.get("summary", ""), "status": fields.get("status", {}).get("name", ""), "assignee": fields.get("assignee", {}).get("displayName", "Unassigned") if fields.get("assignee") else "Unassigned", "priority": fields.get("priority", {}).get("name", "") if fields.get("priority") else "", "created": fields.get("created", ""), "updated": fields.get("updated", "") }) return [TextContent( type="text", text=json.dumps(formatted_issues, indent=2) )]
- src/jira_server.py:55-69 (schema)The input schema definition for the jira_search_issues tool, specifying the JQL query as required and optional max_results.inputSchema={ "type": "object", "properties": { "jql": { "type": "string", "description": "JQL query string" }, "max_results": { "type": "integer", "description": "Maximum number of results to return", "default": 50 } }, "required": ["jql"] }
- src/jira_server.py:52-70 (registration)The registration of the jira_search_issues tool in the list_tools() method, including name, description, and schema.Tool( name="jira_search_issues", description="Search for Jira issues using JQL", inputSchema={ "type": "object", "properties": { "jql": { "type": "string", "description": "JQL query string" }, "max_results": { "type": "integer", "description": "Maximum number of results to return", "default": 50 } }, "required": ["jql"] } ),