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"],
      },
    },
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 mentions 'enhanced' but doesn't explain what that entails—such as pagination support, performance characteristics, or authentication needs. For a search tool with potential complexity, this leaves significant gaps in understanding how it behaves beyond basic query execution.

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 with no wasted words. It's front-loaded with the core purpose, making it easy to scan and understand quickly, which is ideal for conciseness.

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 of a search tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'enhanced' means, what the output looks like (e.g., issue lists, pagination details), or how it differs from sibling tools, leaving the agent with insufficient context for effective use.

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?

Schema description coverage is 100%, so the schema already documents all parameters clearly. The description adds no additional meaning beyond what's in the schema, such as examples of JQL queries or typical use cases for parameters like 'expand'. Baseline 3 is appropriate as the schema does the heavy lifting.

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

Purpose3/5

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

The description states the tool performs 'enhanced JQL search in Jira', which identifies the action (search) and domain (Jira). However, it's vague about what 'enhanced' means compared to basic JQL search, and it doesn't clearly differentiate from the sibling tool 'get_issue', which might retrieve individual issues rather than search multiple issues.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_issue'. The description lacks context on scenarios where this search is preferred, prerequisites, or exclusions, leaving the agent to infer usage based on the tool name 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/CamdenClark/jira-mcp'

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