Skip to main content
Glama

get_project_components

Retrieve all components for a Jira project to organize and categorize issues effectively.

Instructions

Get all available components for a Jira project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesThe project key (e.g., "TSSE")

Implementation Reference

  • Core handler function that executes the tool logic by calling Jira API to fetch project components
    export async function getProjectComponents(projectKey: string): Promise<ProjectComponent[]> { const response = await jiraFetch<Array<{ id: string; name: string; description?: string; }>>(`/project/${projectKey}/components`); return response.map((c) => ({ id: c.id, name: c.name, description: c.description, })); }
  • src/index.ts:419-461 (registration)
    MCP tool registration including Zod input/output schemas and thin wrapper handler that calls the core implementation
    server.registerTool( 'get_project_components', { title: 'Get Project Components', description: 'Get all available components for a Jira project', inputSchema: { projectKey: z.string().describe('The project key (e.g., "TSSE")'), }, outputSchema: { components: z.array(z.object({ id: z.string(), name: z.string(), description: z.string().optional(), })).optional(), error: z.object({ message: z.string(), statusCode: z.number().optional(), details: z.unknown().optional(), }).optional(), }, }, async ({ projectKey }) => { try { if (!projectKey || !projectKey.trim()) { throw new Error('projectKey is required'); } const components = await getProjectComponents(projectKey); const output = { components }; return { content: [{ type: 'text', text: JSON.stringify(output, null, 2) }], structuredContent: output, }; } catch (error) { const errOutput = formatError(error); return { content: [{ type: 'text', text: JSON.stringify(errOutput, null, 2) }], structuredContent: errOutput, isError: true, }; } } );
  • TypeScript interface defining the structure of a project component used by the handler and schemas
    export interface ProjectComponent { id: string; name: string; description?: string;

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

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