Skip to main content
Glama
raalarcon9705

raalarcon-jira-mcp-server

get_sprints

Fetch all sprints for a Jira board, with optional filtering by state to show active, closed, or future sprints.

Instructions

Get all sprints for a specific board. Returns sprint information including ID, name, state, and dates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardIdYesThe ID of the board to get sprints from. Use get_agile_boards to find available board IDs.
stateNoFilter sprints by state: "active" for current sprint, "closed" for completed sprints, "future" for upcoming sprints.

Implementation Reference

  • The handler function that executes the get_sprints tool logic. Validates args with getSprintsSchema, calls jiraClient.getSprints(), extracts essential fields (id, name, state, startDate, endDate, goal) from the response, and returns them as JSON.
    case 'get_sprints': {
      const validatedArgs = await getSprintsSchema.validate(args);
      const sprints = await jiraClient.getSprints(validatedArgs);
    
      // Extract only essential fields to reduce token usage
      const essentialSprints = sprints.values?.map((sprint) => ({
        id: sprint.id,
        name: sprint.name,
        state: sprint.state,
        startDate: sprint.startDate,
        endDate: sprint.endDate,
        goal: sprint.goal
      })) || [];
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(essentialSprints, null, 2),
          },
        ],
      };
    }
  • Yup validation schema for get_sprints. Requires boardId (number), optional state string filtered to one of 'active', 'closed', 'future'.
    export const getSprintsSchema = yup.object({
      boardId: yup.number().required('Board ID is required'),
      state: yup.string().oneOf(['active', 'closed', 'future']).optional(),
    });
  • TypeScript type GetSprintsInput derived from the getSprintsSchema.
    export type GetSprintsInput = yup.InferType<typeof getSprintsSchema>;
  • Registration of the get_sprints tool definition including name, description, and inputSchema (boardId required, state optional). The tool is created in createSprintTools() and registered in index.ts via tool listing (line 57) and routing (line 97).
    export function createSprintTools(_jiraClient: JiraClient): Tool[] {
      return [
        {
          name: 'get_sprints',
          description: 'Get all sprints for a specific board. Returns sprint information including ID, name, state, and dates.',
          inputSchema: {
            type: 'object',
            properties: {
              boardId: {
                type: 'number',
                description: 'The ID of the board to get sprints from. Use get_agile_boards to find available board IDs.',
              },
              state: {
                type: 'string',
                enum: ['active', 'closed', 'future'],
                description: 'Filter sprints by state: "active" for current sprint, "closed" for completed sprints, "future" for upcoming sprints.',
              },
            },
            required: ['boardId'],
          },
        },
  • The JiraClient.getSprints() method that calls the Jira Agile API (this.agileClient.board.getAllSprints) with boardId and optional state filter.
    async getSprints(input: GetSprintsInput) {
      try {
        const response = await this.agileClient.board.getAllSprints({
          boardId: input.boardId,
          state: input.state as 'active' | 'closed' | 'future',
        });
        return response;
      } catch (error) {
        throw new Error(`Failed to get sprints: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits. It states that the tool returns data, implying a read operation, but does not explicitly declare it as read-only or mention any side effects, permissions, or rate limits. The description is adequate but minimal.

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 two sentences, front-loaded with the purpose, and contains no extraneous information. Every word contributes to understanding the tool's function.

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?

Despite the lack of output schema, the description mentions the key return fields (ID, name, state, dates). However, it does not address potential issues like pagination if many sprints exist, and the optional state filter is only inferred from the schema. For a simple retrieval tool, this is largely sufficient.

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% coverage with descriptions for both parameters, so the description adds no new information about the parameters. The description focuses on the return values rather than enhancing parameter meaning. Baseline 3 is appropriate.

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?

The description clearly states it retrieves all sprints for a specific board and lists the return fields. The verb 'Get' combined with the resource 'sprints' is specific, and the tool is easily distinguishable from sibling tools like close_sprint, create_sprint, and get_sprint_issues which perform different operations.

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 provides a hint in the boardId parameter annotation about using get_agile_boards to find board IDs, but lacks explicit guidance on when to use this tool versus other sprint-related tools. There is no statement about when not to use it or alternative tools.

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