Skip to main content
Glama

Get Project Components

get_project_components

Retrieve all components for a Jira project to organize and manage issue categorization effectively.

Instructions

Get all available components for a Jira project

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
componentsNo

Implementation Reference

  • The core handler function that fetches and maps project components from the Jira API endpoint `/project/${projectKey}/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,
      }));
    }
  • Type definition for ProjectComponent used in the tool's output.
    export interface ProjectComponent {
      id: string;
      name: string;
      description?: string;
    }
  • src/index.ts:419-461 (registration)
    MCP server tool registration, including Zod input/output schemas, title, description, and thin wrapper handler that validates input and calls the core getProjectComponents function.
    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,
          };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get all available components' but does not clarify if this is a read-only operation, requires authentication, has rate limits, returns paginated results, or handles errors. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and appropriately sized, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter) and the presence of an output schema, the description is minimally adequate. However, with no annotations and incomplete behavioral details, it does not fully compensate for the lack of structured context, leaving room for improvement in guiding the agent.

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?

The input schema has 100% description coverage, with the 'projectKey' parameter clearly documented. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, so it meets the baseline score of 3 for high schema coverage.

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 clearly states the verb 'Get' and the resource 'all available components for a Jira project', making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'get_issue_details' or 'search_issues', which might also involve project components indirectly, so it lacks sibling differentiation for a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, exclusions, or compare to sibling tools such as 'get_issue_details' for component-specific details or 'search_issues' for broader queries, leaving the agent without contextual usage cues.

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

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