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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"jql": "<jql>"
},
"name": "jira_search_issues"
}
}Input 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 handler function that implements the core logic for the 'jira_search_issues' tool. It extracts JQL and max_results from arguments, queries the Jira client, formats the issue data into a list of dictionaries (key, summary, status, assignee, priority, created, updated), and returns it as a JSON-formatted TextContent.
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:52-70 (registration)Registration of the 'jira_search_issues' tool in the list_tools() method, including its name, description, and input schema definition.
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"] } ), - src/jira_server.py:55-69 (schema)The input schema for the 'jira_search_issues' tool, defining parameters 'jql' (required string) and 'max_results' (optional integer, default 50).
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"] }