Skip to main content
Glama

jira_get_project_components

Retrieve all components for a Jira project to identify valid values for the components field when creating or updating issues.

Instructions

Get all components for a project - use this to find valid values for the components field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesProject key to get components for

Implementation Reference

  • src/index.ts:505-519 (registration)
    Tool registration in the listTools handler, defining name, description, and input schema.
    { name: "jira_get_project_components", description: "Get all components for a project - use this to find valid values for the components field", inputSchema: { type: "object", properties: { projectKey: { type: "string", description: "Project key to get components for", }, }, required: ["projectKey"], }, },
  • Zod input schema for validating tool arguments: requires projectKey string.
    const GetProjectComponentsSchema = z.object({ projectKey: z.string().describe("Project key to get components for"), });
  • MCP tool handler switch case: parses args, calls jiraClient.getProjectComponents, returns JSON stringified response.
    case "jira_get_project_components": { const { projectKey } = GetProjectComponentsSchema.parse(args); const components = await jiraClient.getProjectComponents(projectKey); return { content: [ { type: "text", text: JSON.stringify(components, null, 2) }, ], }; }
  • JiraClient helper method implementing the core logic: GET request to /rest/api/2/project/{projectKey}/components using the private request method.
    async getProjectComponents( projectKey: string ): Promise<Array<{ id: string; name: string; description?: string }>> { return this.request< Array<{ id: string; name: string; description?: string }> >(`/project/${projectKey}/components`); }

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/yogeshhrathod/JiraMCP'

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