Skip to main content
Glama

list_projects

Retrieve all Jira projects to view available workspaces and their details for project management and tracking.

Instructions

List all the projects on Jira on the api /rest/api/3/project. Do not use markdown in your query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
number_of_resultsNoNumber of results to return

Implementation Reference

  • The main handler function 'listProjects' that fetches the list of projects from Jira API /rest/api/3/project using axios, with optional maxResults parameter.
    async function listProjects(number_of_results: number): Promise<any> { try { const params = { maxResults: number_of_results, // Adjust as needed }; const response = await axios.get(`${JIRA_URL}/rest/api/3/project`, { headers: getAuthHeaders().headers, params, }); return response.data; } catch (error: any) { //return the error in a json return { error: error.response.data, }; } }
  • The input schema definition for the 'list_projects' tool, including name, description, and inputSchema with number_of_results.
    name: 'list_projects', description: 'List all the projects on Jira on the api /rest/api/3/project. Do not use markdown in your query.', inputSchema: { type: 'object', properties: { number_of_results: { type: 'integer', description: 'Number of results to return', default: 1, }, }, }, },
  • src/index.ts:803-818 (registration)
    The registration/dispatch case in the CallToolRequestSchema handler that calls the listProjects function and returns the JSON response as text content.
    case 'list_projects': { const number_of_results = Number( request.params.arguments?.number_of_results ?? 1, ); const response = await listProjects(number_of_results); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2), }, ], }; }

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/KS-GEN-AI/jira-mcp-server'

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