Skip to main content
Glama
imrnbeg

Jira MCP Server

by imrnbeg

List Issues in Project

list_project_issues

Retrieve Jira issues for a specific project with optional filtering and pagination controls to manage and analyze project tasks effectively.

Instructions

List issues for a project with optional JQL tail filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesProject key (e.g., PROJ)
jqlTailNoOptional extra JQL, e.g., AND status="In Progress"
startAtNoPagination start index (default 0)
maxResultsNoPage size (1-100, default 50)

Implementation Reference

  • Handler function for the 'list_project_issues' tool. Constructs a JQL query for issues in the specified project (with optional filters), performs a POST to Jira's search API, processes the results, and returns formatted content and structured data.
    async (args: { projectKey: string; jqlTail?: string; startAt?: number; maxResults?: number }) => {
      const jql = `project=${args.projectKey}${args.jqlTail ? " " + args.jqlTail : ""}`;
      return await (async () => {
        try {
          const body: any = { jql, startAt: args.startAt ?? 0, maxResults: args.maxResults ?? 50, fields: ["key","summary","status","assignee","priority","issuetype","updated"] };
          const response = await fetch(`${JIRA_URL}/rest/api/3/search`, { method: "POST", headers: getJiraHeaders(), body: JSON.stringify(body) });
          if (!response.ok) {
            const errorText = await response.text();
            return { content: [{ type: "text", text: `Failed to list project issues: ${response.status} ${response.statusText}\n${errorText}` }], isError: true };
          }
          const data = await response.json() as any;
          const items = (data.issues || []).map((it: any) => ({ key: it.key, summary: it.fields?.summary, status: it.fields?.status?.name, assignee: it.fields?.assignee?.displayName, priority: it.fields?.priority?.name, type: it.fields?.issuetype?.name, updated: it.fields?.updated, url: `${JIRA_URL}/browse/${it.key}` }));
          return { content: [{ type: "text", text: `Found ${data.total ?? items.length} issues in ${args.projectKey} (showing ${items.length}).` }], structuredContent: { total: data.total ?? items.length, startAt: data.startAt ?? 0, maxResults: data.maxResults ?? items.length, issues: items, projectKey: args.projectKey, raw: data } };
        } catch (error) {
          return { content: [{ type: "text", text: `Error listing issues for ${args.projectKey}: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      })();
    }
  • Input schema definition for the 'list_project_issues' tool, specifying parameters like projectKey, optional JQL tail, and pagination options using Zod validators.
    {
      title: "List Issues in Project",
      description: "List issues for a project with optional JQL tail filters.",
      inputSchema: {
        projectKey: z.string().describe("Project key (e.g., PROJ)"),
        jqlTail: z.string().optional().describe("Optional extra JQL, e.g., AND status=\"In Progress\""),
        startAt: z.number().int().min(0).optional().describe("Pagination start index (default 0)"),
        maxResults: z.number().int().min(1).max(100).optional().describe("Page size (1-100, default 50)"),
      },
  • src/server.ts:276-306 (registration)
    Registration of the 'list_project_issues' MCP tool on the server instance using mcp.registerTool, including title, description, input schema, and handler function.
    mcp.registerTool(
      "list_project_issues",
      {
        title: "List Issues in Project",
        description: "List issues for a project with optional JQL tail filters.",
        inputSchema: {
          projectKey: z.string().describe("Project key (e.g., PROJ)"),
          jqlTail: z.string().optional().describe("Optional extra JQL, e.g., AND status=\"In Progress\""),
          startAt: z.number().int().min(0).optional().describe("Pagination start index (default 0)"),
          maxResults: z.number().int().min(1).max(100).optional().describe("Page size (1-100, default 50)"),
        },
      },
      async (args: { projectKey: string; jqlTail?: string; startAt?: number; maxResults?: number }) => {
        const jql = `project=${args.projectKey}${args.jqlTail ? " " + args.jqlTail : ""}`;
        return await (async () => {
          try {
            const body: any = { jql, startAt: args.startAt ?? 0, maxResults: args.maxResults ?? 50, fields: ["key","summary","status","assignee","priority","issuetype","updated"] };
            const response = await fetch(`${JIRA_URL}/rest/api/3/search`, { method: "POST", headers: getJiraHeaders(), body: JSON.stringify(body) });
            if (!response.ok) {
              const errorText = await response.text();
              return { content: [{ type: "text", text: `Failed to list project issues: ${response.status} ${response.statusText}\n${errorText}` }], isError: true };
            }
            const data = await response.json() as any;
            const items = (data.issues || []).map((it: any) => ({ key: it.key, summary: it.fields?.summary, status: it.fields?.status?.name, assignee: it.fields?.assignee?.displayName, priority: it.fields?.priority?.name, type: it.fields?.issuetype?.name, updated: it.fields?.updated, url: `${JIRA_URL}/browse/${it.key}` }));
            return { content: [{ type: "text", text: `Found ${data.total ?? items.length} issues in ${args.projectKey} (showing ${items.length}).` }], structuredContent: { total: data.total ?? items.length, startAt: data.startAt ?? 0, maxResults: data.maxResults ?? items.length, issues: items, projectKey: args.projectKey, raw: data } };
          } catch (error) {
            return { content: [{ type: "text", text: `Error listing issues for ${args.projectKey}: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
          }
        })();
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'optional JQL tail filters' but doesn't disclose key behavioral traits such as pagination behavior (implied by parameters but not described), rate limits, authentication needs, or what the output looks like (e.g., list format, error handling). This leaves significant gaps for a tool with 4 parameters and no output schema.

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 that front-loads the core purpose ('List issues for a project') and adds essential detail ('with optional JQL tail filters') without waste. Every word earns its place, making it easy to scan and understand quickly.

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 tool's complexity (4 parameters, no output schema, no annotations), the description is incomplete. It lacks details on behavioral aspects like pagination, output format, error conditions, or how it differs from siblings. Without annotations or output schema, the description should compensate more to guide effective use, but it falls short.

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 fully documents all parameters. The description adds minimal value beyond the schema by hinting at JQL usage ('optional JQL tail filters'), but doesn't provide additional syntax, examples, or constraints. With high schema coverage, the baseline is 3, as the description doesn't significantly enhance parameter understanding.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('issues for a project'), specifying the action and target. It distinguishes from siblings like 'get_jira_issue' (single issue) and 'search_jira_issues' (general search) by focusing on project-specific listing with JQL filtering, though it doesn't explicitly name these alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through 'optional JQL tail filters,' suggesting it's for filtering within a project, but lacks explicit guidance on when to use this tool versus alternatives like 'search_jira_issues' (which might handle broader searches) or 'list_sprint_issues' (sprint-specific). No exclusions or prerequisites are mentioned.

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

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