Skip to main content
Glama

jql_search

Search Jira issues using JQL queries to filter and retrieve specific project data with customizable result fields and pagination.

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 for the jql_search tool. Destructures arguments, makes a POST request to Jira's /rest/api/2/search endpoint with the JQL query, handles pagination and fields, returns 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 for the jql_search tool, defining parameters like jql (required), nextPageToken, maxResults, fields, and expand.
    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 ListToolsRequestSchema handler, including 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