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`);
    }
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 the tool retrieves data ('Get all components'), implying it's a read-only operation, but doesn't mention potential behaviors like pagination, error handling, authentication needs, or rate limits. For a tool with no annotations, this leaves significant gaps in understanding how it behaves beyond the basic action.

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 extremely concise and front-loaded: it states the core action in the first clause and the primary use case in the second. Every sentence earns its place by providing essential information without redundancy or fluff, making it efficient and easy to parse.

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 (single parameter, no output schema), the description is somewhat complete but lacks depth. It explains the purpose and usage but omits behavioral details like return format or error conditions. With no annotations and no output schema, the description should do more to compensate, but it's minimally adequate for a simple retrieval tool.

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 well-documented in the schema itself. The description adds no additional parameter details beyond what the schema provides, such as format examples or constraints. Given the high schema coverage, a baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't need to.

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 tool's purpose: 'Get all components for a project'. This is a specific verb ('Get') and resource ('components for a project'), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'jira_get_project' or 'jira_get_project_versions', which also retrieve project-related data, so it falls short of 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage guidance: 'use this to find valid values for the components field'. This explains when to use the tool (to populate component options) and implies its utility in issue creation or updates. It doesn't specify when not to use it or name alternatives, but the context is sufficiently clear for effective use.

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

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