Skip to main content
Glama
raalarcon9705

raalarcon-jira-mcp-server

get_projects

Discover available Jira projects and retrieve their keys, names, IDs, and metadata to prepare for issue creation or other operations.

Instructions

Retrieve all Jira projects accessible to the authenticated user. Returns project keys, names, IDs, and basic metadata. Use this to discover available projects before creating issues or performing other operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expandNoComma-separated list of additional data to include: description,lead,issueTypes,url,projectKeys,permissions,insight
recentNoReturn only recently viewed projects (0-20). Useful for quick access to frequently used projects.

Implementation Reference

  • Handler function for the 'get_projects' tool. Validates args using the schema, calls jiraClient.getProjects(), extracts essential fields (key, name, id, projectTypeKey) and returns them as JSON text content.
    case 'get_projects': {
      const validatedArgs = await getProjectsSchema.validate(args);
      const projects = await jiraClient.getProjects(validatedArgs);
    
      // Extract only essential fields to reduce token usage
      const pageProject = projects;
      const essentialProjects = pageProject.values?.map((project) => ({
        key: project.key,
        name: project.name,
        id: project.id,
        projectTypeKey: project.projectTypeKey
      })) || [];
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(essentialProjects, null, 2),
          },
        ],
      };
    }
  • Yup validation schema for get_projects. Defines optional 'expand' (string) and 'recent' (number) input fields.
    // Schema for getting projects
    export const getProjectsSchema = yup.object({
      expand: yup.string().optional(),
      recent: yup.number().optional(),
    });
  • Tool registration/definition: name 'get_projects', description, and input JSON Schema for expand (string) and recent (number). Created via createProjectTools() which is called in src/index.ts.
    return [
      {
        name: 'get_projects',
        description: 'Retrieve all Jira projects accessible to the authenticated user. Returns project keys, names, IDs, and basic metadata. Use this to discover available projects before creating issues or performing other operations.',
        inputSchema: {
          type: 'object',
          properties: {
            expand: {
              type: 'string',
              description: 'Comma-separated list of additional data to include: description,lead,issueTypes,url,projectKeys,permissions,insight',
            },
            recent: {
              type: 'number',
              description: 'Return only recently viewed projects (0-20). Useful for quick access to frequently used projects.',
            },
          },
        },
      },
  • src/index.ts:69-71 (registration)
    Routing in the main server: tools starting with 'get_projects' are routed to handleProjectTool().
    if (name.startsWith('get_projects') || name.startsWith('get_issue_types')) {
      return await handleProjectTool(name, args || {}, this.jiraClient);
    } else if (
  • JiraClient.getProjects method. Calls jira.js SDK's projects.searchProjects() with optional expand parameter and returns the response.
    // Get all projects
    async getProjects(input: GetProjectsInput = {}) {
      try {
        const response = await this.jira.projects.searchProjects({
          expand: input.expand,
        });
        return response;
      } catch (error) {
        throw new Error(`Failed to get projects: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
Behavior3/5

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

Description indicates a safe read operation by stating it 'Retrieves' data. With no annotations provided, the description carries the full burden, but it adequately conveys the non-destructive nature and basic behavior. No additional details about auth or rate limits are needed for such a simple read tool.

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?

Two concise sentences that front-load the purpose and immediately provide a usage hint. No unnecessary words or redundancy.

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

Completeness4/5

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

With no output schema, the description adequately summarizes what is returned (keys, names, IDs, basic metadata). The tool is simple with no required parameters, so the description is complete given the low complexity.

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 coverage is 100%, so the input schema already fully explains both parameters (expand and recent). The description does not add any extra semantic value beyond what the schema provides, meeting the baseline expectation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool retrieves Jira projects accessible to the user, and specifies the returned data (keys, names, IDs, basic metadata). The verb 'retrieve' and resource 'projects' are specific, distinguishing it from sibling tools like get_issue or get_agile_boards.

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?

Explicitly advises using this tool 'before creating issues or performing other operations,' providing clear context for when to use it. However, it does not mention when not to use it or alternatives, but among siblings, there is no other project-listing tool, so exclusion is implicit.

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

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