Skip to main content
Glama

list_projects

Retrieve and filter Jira projects to manage workflows, track progress, and organize tasks with customizable parameters for results and details.

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 main handler function for the 'list_projects' tool. It constructs a Jira API URL for listing projects, adds optional query parameters (maxResults, query, expand), fetches the data using $jiraJson, and returns the result wrapped in ok/err.
    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); }
  • Zod schema defining the input parameters for the list_projects tool: optional maxResults (number), query (string), and expand (string).
    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.", ), });
  • Tool registration object defining the name, description, and input schema for the 'list_projects' tool.
    export const LIST_PROJECTS_TOOL: Tool = { name: "list_projects", description: "List projects from Jira", inputSchema: zodToJsonSchema(listProjectsInputSchema) as Tool["inputSchema"], };
  • src/app.ts:39-48 (registration)
    Central registration of all tools in the MCP server, including LIST_PROJECTS_TOOL, provided via listTools endpoint.
    export const tools = [ // list LIST_PROJECTS_TOOL, LIST_BOARDS_TOOL, LIST_SPRINTS_FROM_BOARD_TOOL, LIST_ISSUES_FROM_SPRINT_TOOL, // create CREATE_ISSUE_TOOL, ] satisfies Tool[];

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