Skip to main content
Glama
imrnbeg

Jira MCP Server

by imrnbeg

List Boards

list_boards

Retrieve Jira boards with filters for board type (scrum/kanban) and project. Use pagination to manage large result sets.

Instructions

List Jira boards with optional type and project filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoBoard type filter
projectKeyOrIdNoFilter boards by project key or ID
startAtNoPagination start index (default 0)
maxResultsNoPage size (1-100, default 50)

Implementation Reference

  • Handler function that implements the list_boards tool by querying the Jira Agile API endpoint /rest/agile/1.0/board with optional filters for type, project, pagination, processes the response, and returns formatted content and structured data.
    async (args: { type?: "scrum"|"kanban"; projectKeyOrId?: string; startAt?: number; maxResults?: number }) => {
      try {
        const params = new URLSearchParams();
        if (args.type) params.set("type", args.type);
        if (args.projectKeyOrId) params.set("projectKeyOrId", args.projectKeyOrId);
        if (typeof args.startAt === "number") params.set("startAt", String(args.startAt));
        if (typeof args.maxResults === "number") params.set("maxResults", String(args.maxResults));
        const url = `${JIRA_URL}/rest/agile/1.0/board${params.toString() ? `?${params.toString()}` : ""}`;
        const response = await fetch(url, { method: "GET", headers: getJiraHeaders() });
        if (!response.ok) {
          const errorText = await response.text();
          return { content: [{ type: "text", text: `Failed to list boards: ${response.status} ${response.statusText}\n${errorText}` }], isError: true };
        }
        const data = await response.json() as any;
        const boards = (data.values || []).map((b: any) => ({ id: b.id, name: b.name, type: b.type, location: b.location }));
        return { content: [{ type: "text", text: `Found ${data.total ?? boards.length} boards (showing ${boards.length}).` }], structuredContent: { total: data.total ?? boards.length, startAt: data.startAt ?? 0, maxResults: data.maxResults ?? boards.length, boards, raw: data } };
      } catch (error) {
        return { content: [{ type: "text", text: `Error listing boards: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
      }
    }
  • Input schema defining the parameters for the list_boards tool using Zod validation: optional type (scrum/kanban), projectKeyOrId, startAt, and maxResults.
    inputSchema: {
      type: z.enum(["scrum","kanban"]).optional().describe("Board type filter"),
      projectKeyOrId: z.string().optional().describe("Filter boards by project key or ID"),
      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:341-373 (registration)
    Registration of the list_boards tool using mcp.registerTool, including name, tool specification (title, description, schema), and handler function reference.
    mcp.registerTool(
      "list_boards",
      {
        title: "List Boards",
        description: "List Jira boards with optional type and project filter.",
        inputSchema: {
          type: z.enum(["scrum","kanban"]).optional().describe("Board type filter"),
          projectKeyOrId: z.string().optional().describe("Filter boards by project key or ID"),
          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: { type?: "scrum"|"kanban"; projectKeyOrId?: string; startAt?: number; maxResults?: number }) => {
        try {
          const params = new URLSearchParams();
          if (args.type) params.set("type", args.type);
          if (args.projectKeyOrId) params.set("projectKeyOrId", args.projectKeyOrId);
          if (typeof args.startAt === "number") params.set("startAt", String(args.startAt));
          if (typeof args.maxResults === "number") params.set("maxResults", String(args.maxResults));
          const url = `${JIRA_URL}/rest/agile/1.0/board${params.toString() ? `?${params.toString()}` : ""}`;
          const response = await fetch(url, { method: "GET", headers: getJiraHeaders() });
          if (!response.ok) {
            const errorText = await response.text();
            return { content: [{ type: "text", text: `Failed to list boards: ${response.status} ${response.statusText}\n${errorText}` }], isError: true };
          }
          const data = await response.json() as any;
          const boards = (data.values || []).map((b: any) => ({ id: b.id, name: b.name, type: b.type, location: b.location }));
          return { content: [{ type: "text", text: `Found ${data.total ?? boards.length} boards (showing ${boards.length}).` }], structuredContent: { total: data.total ?? boards.length, startAt: data.startAt ?? 0, maxResults: data.maxResults ?? boards.length, boards, raw: data } };
        } catch (error) {
          return { content: [{ type: "text", text: `Error listing boards: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Helper function used by the list_boards handler (and others) to generate HTTP headers with Basic Auth for Jira API requests.
    function getJiraHeaders(): Record<string, string> {
      const auth = Buffer.from(`${JIRA_EMAIL}:${JIRA_API_TOKEN}`).toString('base64');
      return {
        'Authorization': `Basic ${auth}`,
        'Accept': 'application/json',
        'Content-Type': 'application/json',
      };
    }
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. While it implies a read-only operation by using 'List', it lacks details on permissions, rate limits, pagination behavior (beyond what the schema covers), or what the output looks like. For a tool with no annotations, this leaves significant gaps in understanding how it behaves in practice.

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 and includes key details about filtering. There is no wasted language or redundancy, making it easy to parse and understand quickly. This exemplifies optimal conciseness for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and hints at filtering, but lacks details on output format, error handling, or integration with sibling tools. Without annotations or an output schema, more context would be needed for full completeness.

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?

The description mentions optional type and project filters, which aligns with two of the four parameters in the schema. However, with 100% schema description coverage, the schema already fully documents all parameters, including their types, constraints, and descriptions. The description adds minimal value beyond what the schema provides, meeting the baseline for high coverage.

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 action ('List') and resource ('Jira boards'), making the purpose immediately understandable. It also mentions optional filtering capabilities, which adds specificity. However, it doesn't differentiate this tool from its siblings (like 'list_jira_projects' or 'list_board_sprints'), which would require a more explicit distinction to reach a score of 5.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions optional filters but doesn't specify scenarios where filtering by type or project is appropriate, nor does it reference sibling tools for related tasks. Without any context on usage boundaries or prerequisites, this falls short of providing meaningful guidance.

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