Skip to main content
Glama
imrnbeg

Jira MCP Server

by imrnbeg

Get Jira Project Details

get_jira_project

Retrieve comprehensive metadata for a Jira project using its key or ID to access project details and structure.

Instructions

Get full metadata for a Jira project by key or ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdOrKeyYesProject key or ID (e.g., PROJ or 10001)

Implementation Reference

  • The handler function that fetches and returns detailed metadata for a specified Jira project using the REST API endpoint /rest/api/3/project/{projectIdOrKey}, including error handling and structured content.
    async (args: { projectIdOrKey: string }) => {
      try {
        const url = `${JIRA_URL}/rest/api/3/project/${encodeURIComponent(args.projectIdOrKey)}`;
        const response = await fetch(url, { method: "GET", headers: getJiraHeaders() });
        if (!response.ok) {
          const errorText = await response.text();
          return { content: [{ type: "text", text: `Failed to get project ${args.projectIdOrKey}: ${response.status} ${response.statusText}\n${errorText}` }], isError: true };
        }
        const project = await response.json() as any;
        return {
          content: [{ type: "text", text: `Project ${project.key}: ${project.name}` }],
          structuredContent: { id: project.id, key: project.key, name: project.name, url: `${JIRA_URL}/jira/software/c/projects/${project.key}`, lead: project.lead, components: project.components, issueTypes: project.issueTypes, raw: project },
        };
      } catch (error) {
        return { content: [{ type: "text", text: `Error getting project ${args.projectIdOrKey}: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
      }
    }
  • Zod-based input schema defining the required 'projectIdOrKey' parameter for the tool.
    inputSchema: {
      projectIdOrKey: z.string().describe("Project key or ID (e.g., PROJ or 10001)"),
    },
  • src/server.ts:185-210 (registration)
    MCP tool registration call that defines the tool name, title, description, input schema, and attaches the handler function.
      "get_jira_project",
      {
        title: "Get Jira Project Details",
        description: "Get full metadata for a Jira project by key or ID.",
        inputSchema: {
          projectIdOrKey: z.string().describe("Project key or ID (e.g., PROJ or 10001)"),
        },
      },
      async (args: { projectIdOrKey: string }) => {
        try {
          const url = `${JIRA_URL}/rest/api/3/project/${encodeURIComponent(args.projectIdOrKey)}`;
          const response = await fetch(url, { method: "GET", headers: getJiraHeaders() });
          if (!response.ok) {
            const errorText = await response.text();
            return { content: [{ type: "text", text: `Failed to get project ${args.projectIdOrKey}: ${response.status} ${response.statusText}\n${errorText}` }], isError: true };
          }
          const project = await response.json() as any;
          return {
            content: [{ type: "text", text: `Project ${project.key}: ${project.name}` }],
            structuredContent: { id: project.id, key: project.key, name: project.name, url: `${JIRA_URL}/jira/software/c/projects/${project.key}`, lead: project.lead, components: project.components, issueTypes: project.issueTypes, raw: project },
          };
        } catch (error) {
          return { content: [{ type: "text", text: `Error getting project ${args.projectIdOrKey}: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Utility function that generates the HTTP headers required for authenticated requests to the Jira API, using environment variables for credentials.
    function getJiraHeaders(): Record<string, string> {
      const auth = Buffer.from(`${JIRA_EMAIL}:${JIRA_API_TOKEN}`).toString('base64');
      return {
        'Authorization': `Basic ${auth}`,
        'Accept': 'application/json',
        'Content-Type': 'application/json',
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It doesn't disclose whether this is a read-only operation (implied by 'Get'), authentication requirements, rate limits, error conditions, or what 'full metadata' includes. The description doesn't contradict annotations (none exist), but fails to provide necessary operational details.

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 front-loads the core purpose. Every word contributes meaning without redundancy. It's appropriately sized for a simple lookup tool with one parameter.

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?

For a simple read operation with one parameter and 100% schema coverage, the description is minimally adequate. However, without annotations or output schema, it should better explain what 'full metadata' includes and any behavioral constraints. The description covers the basics but leaves gaps about the operation's scope and limitations.

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?

Schema description coverage is 100%, so the parameter is fully documented in the schema. The description adds marginal value by reinforcing that both 'key or ID' are accepted and providing examples ('e.g., PROJ or 10001'), but doesn't explain semantic differences between using key vs ID. This meets the baseline 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 action ('Get full metadata') and resource ('for a Jira project'), specifying it works 'by key or ID'. It distinguishes from siblings like 'list_jira_projects' by focusing on individual project details rather than listing multiple projects. However, it doesn't explicitly contrast with 'get_project_statuses' which might provide overlapping information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description implies usage when needing detailed metadata for a specific project, but provides no explicit guidance on when to choose this over alternatives like 'list_jira_projects' (for overviews) or 'get_project_statuses' (for status-specific data). No exclusion criteria or prerequisites are mentioned.

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

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