Skip to main content
Glama

jql_search

Search Jira issues using JQL queries to filter, sort, and retrieve specific issue data with customizable result fields.

Instructions

Perform enhanced JQL search in Jira

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jqlYesJQL query string
nextPageTokenNoToken for next page
maxResultsNoMaximum results to fetch
fieldsNoList of fields to return for each issue
expandNoAdditional info to include in the response

Implementation Reference

  • Handler function that executes the jql_search tool by sending a POST request to Jira's search API with the JQL query and optional parameters, returning formatted JSON or error.
    if (name === "jql_search") { const { jql, nextPageToken, maxResults, fields, expand } = args; try { const response = await fetch(`${JIRA_INSTANCE_URL}/rest/api/2/search`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Basic ${Buffer.from(`${JIRA_USER_EMAIL}:${JIRA_API_KEY}`).toString("base64")}`, }, body: JSON.stringify({ jql, startAt: nextPageToken || 0, maxResults: maxResults || 50, fields: fields || ["*all"], expand, }), }); if (!response.ok) { throw new Error(`Jira API Error: ${response.statusText}`); } const data = await response.json(); return { content: [ { type: "text", text: JSON.stringify(data, null, 2), // Format JSON response }, ], }; } catch (error) { return { isError: true, content: [ { type: "text", text: `Error: ${error.message}`, }, ], }; } } else if (name === "get_issue") {
  • Input schema defining the parameters for the jql_search tool, including required JQL query and optional pagination, fields, etc.
    inputSchema: { type: "object", properties: { jql: { type: "string", description: "JQL query string" }, nextPageToken: { type: "string", description: "Token for next page", }, maxResults: { type: "integer", description: "Maximum results to fetch", }, fields: { type: "array", items: { type: "string" }, description: "List of fields to return for each issue", }, expand: { type: "string", description: "Additional info to include in the response", }, }, required: ["jql"], },
  • index.js:40-67 (registration)
    Registration of the jql_search tool in the ListTools response, specifying name, description, and input schema.
    { name: "jql_search", description: "Perform enhanced JQL search in Jira", inputSchema: { type: "object", properties: { jql: { type: "string", description: "JQL query string" }, nextPageToken: { type: "string", description: "Token for next page", }, maxResults: { type: "integer", description: "Maximum results to fetch", }, fields: { type: "array", items: { type: "string" }, description: "List of fields to return for each issue", }, expand: { type: "string", description: "Additional info to include in the response", }, }, required: ["jql"], }, },

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/CamdenClark/jira-mcp'

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