Skip to main content
Glama
ParasSolanki

Jira MCP Server

by ParasSolanki

list_projects

Get a list of Jira projects, filtered by query or with expanded details like description, lead, and issue types.

Instructions

List projects from Jira

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxResultsNoThe maximum number of results to return, (max: 100)
queryNoA query string used to filter the returned projects. The query string cannot be used with the startAt and maxResults parameters.
expandNoUse this parameter to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: `description`, `lead`, `issueTypes`, `url`, `projectKeys`, `permissions`, `insight`. Comma separated list of options.

Implementation Reference

  • The `listProjects` async function that fetches projects from Jira's REST API. It builds a URL with optional query, maxResults, and expand parameters, calls $jiraJson, and returns the result.
    export async function listProjects(input: ListProjectsInput) {
      const url = new URL(`/rest/api/2/project`, env.JIRA_BASE_URL);
    
      if (input.maxResults)
        url.searchParams.set("maxResults", input.maxResults.toString());
    
      if (input.query) url.searchParams.set("query", input.query);
    
      if (input.expand) url.searchParams.set("expand", input.expand);
    
      const json = await $jiraJson(url.toString());
    
      if (json.isErr()) return err(json.error);
    
      return ok(json.value);
    }
  • The Zod schema (`listProjectsInputSchema`) that validates input parameters: maxResults (number, optional), query (string, optional), expand (string, optional).
    export const listProjectsInputSchema = z.object({
      maxResults: z
        .number()
        .optional()
        .describe("The maximum number of results to return, (max: 100)"),
      query: z
        .string()
        .optional()
        .describe(
          "A query string used to filter the returned projects. The query string cannot be used with the startAt and maxResults parameters.",
        ),
      expand: z
        .string()
        .optional()
        .describe(
          "Use this parameter to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: `description`, `lead`, `issueTypes`, `url`, `projectKeys`, `permissions`, `insight`. Comma separated list of options.",
        ),
    });
  • The tool definition (`LIST_PROJECTS_TOOL`) with name 'list_projects', description, and inputSchema registered as a Tool object.
    export const LIST_PROJECTS_TOOL: Tool = {
      name: "list_projects",
      description: "List projects from Jira",
      inputSchema: zodToJsonSchema(listProjectsInputSchema) as Tool["inputSchema"],
    };
    
    export type ListProjectsInput = z.output<typeof listProjectsInputSchema>;
    
    export async function listProjects(input: ListProjectsInput) {
      const url = new URL(`/rest/api/2/project`, env.JIRA_BASE_URL);
    
      if (input.maxResults)
        url.searchParams.set("maxResults", input.maxResults.toString());
    
      if (input.query) url.searchParams.set("query", input.query);
    
      if (input.expand) url.searchParams.set("expand", input.expand);
    
      const json = await $jiraJson(url.toString());
  • src/app.ts:39-41 (registration)
    The tool is added to the `tools` array exported from app.ts, which is used to register all tools with the MCP server.
    export const tools = [
      // list
      LIST_PROJECTS_TOOL,
  • The CallToolRequestSchema handler that routes 'list_projects' requests: parses input, calls listProjects, and formats the response.
    if (name === LIST_PROJECTS_TOOL.name) {
      const input = listProjectsInputSchema.safeParse(args);
    
      if (!input.success) {
        return {
          isError: true,
          content: [{ type: "text", text: "Invalid input" }],
        };
      }
    
      const result = await listProjects(input.data);
    
      if (result.isErr()) {
        console.error(result.error.message);
        return {
          isError: true,
          content: [{ type: "text", text: "An error occurred" }],
        };
      }
    
      return {
        content: [
          { type: "text", text: JSON.stringify(result.value, null, 2) },
        ],
      };
    }
Behavior2/5

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

No annotations are present, so the description carries the full burden of disclosure. It does not state whether the operation is read-only, idempotent, or any side effects. The name 'list' implies read-only, but no explicit confirmation is given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise but lacks any structure or additional context. It could be more informative without becoming verbose.

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?

The description is insufficient for a tool with no output schema. It does not explain the return format, pagination behavior, or any error conditions, even though the schema mentions maxResults and expand. The low complexity partly excuses this, but a complete description would add value.

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 coverage is 100%, and the schema descriptions are clear. The description adds no additional meaning beyond the schema, so a baseline score of 3 is appropriate.

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 'List projects from Jira' clearly states the action and resource. It is specific enough to distinguish from siblings like list_boards or list_issues_from_sprint, though it does not explicitly differentiate.

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 (e.g., filtering via query vs. using maxResults). There is no mention of when-not to use it or any prerequisites.

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

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