Skip to main content
Glama
KS-GEN-AI

Jira MCP Server

by KS-GEN-AI

list_projects

Retrieve all Jira projects to view available workspaces and their details for project management and tracking.

Instructions

List all the projects on Jira on the api /rest/api/3/project. Do not use markdown in your query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
number_of_resultsNoNumber of results to return

Implementation Reference

  • The main handler function 'listProjects' that fetches the list of projects from Jira API /rest/api/3/project using axios, with optional maxResults parameter.
    async function listProjects(number_of_results: number): Promise<any> {
      try {
        const params = {
          maxResults: number_of_results, // Adjust as needed
        };
    
        const response = await axios.get(`${JIRA_URL}/rest/api/3/project`, {
          headers: getAuthHeaders().headers,
          params,
        });
    
        return response.data;
      } catch (error: any) {
        //return the error in a json
        return {
          error: error.response.data,
        };
      }
    }
  • The input schema definition for the 'list_projects' tool, including name, description, and inputSchema with number_of_results.
      name: 'list_projects',
      description:
        'List all the projects on Jira on the api /rest/api/3/project. Do not use markdown in your query.',
      inputSchema: {
        type: 'object',
        properties: {
          number_of_results: {
            type: 'integer',
            description: 'Number of results to return',
            default: 1,
          },
        },
      },
    },
  • src/index.ts:803-818 (registration)
    The registration/dispatch case in the CallToolRequestSchema handler that calls the listProjects function and returns the JSON response as text content.
    case 'list_projects': {
      const number_of_results = Number(
        request.params.arguments?.number_of_results ?? 1,
      );
    
      const response = await listProjects(number_of_results);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response, null, 2),
          },
        ],
      };
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries full burden but only states the API endpoint. It does not disclose behavioral traits such as side effects, rate limits, or authentication needs. The instruction about markdown is not about tool behavior.

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

Conciseness3/5

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

The description is short but includes an irrelevant instruction about markdown. While concise, the extraneous sentence reduces clarity. A more focused description would be better.

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?

The tool is simple with one optional parameter and no output schema. The description provides the basic purpose but omits guidance on usage context or return value format. It is minimally complete.

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 single parameter 'number_of_results' is fully described in the schema with 'Number of results to return'. The description adds no further meaning, so baseline of 3 applies given 100% 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?

Clearly states the tool lists all projects on Jira, specifying the API endpoint. The verb 'list' and resource 'projects' are explicit. However, the mention of 'Do not use markdown' is unrelated but does not obscure the purpose.

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?

No guidance on when to use this tool versus alternative tools. It simply describes the action without providing context for selection among sibling tools like execute_jql or get_all_statuses.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.