Skip to main content
Glama

list_group_milestones

Retrieve milestones from a GitLab group with filtering options for state, title, date ranges, and hierarchical scope.

Instructions

List all milestones in a GitLab group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_idYesGroup ID or URL-encoded path
stateNoReturn only active or closed milestones
titleNoReturn only milestones with the given title (case-sensitive)
searchNoReturn only milestones with title or description matching the string
search_titleNoReturn only milestones with title matching the string
include_ancestorsNoInclude milestones for all parent groups
include_descendantsNoInclude milestones for group and its descendants
updated_beforeNoReturn only milestones updated before the given datetime (ISO 8601)
updated_afterNoReturn only milestones updated after the given datetime (ISO 8601)
containing_dateNoReturn only milestones containing the given date
start_dateNoReturn only milestones where due_date >= start_date
end_dateNoReturn only milestones where start_date <= end_date
pageNoPage number for pagination (default: 1)
per_pageNoNumber of results per page (default: 20)

Implementation Reference

  • The handler function that executes the GitLab API call to list milestones for a group.
    export async function listGroupMilestones(
      groupId: string,
      options: {
        state?: "active" | "closed";
        title?: string;
        search?: string;
        search_title?: string;
        include_ancestors?: boolean;
        include_descendants?: boolean;
        updated_before?: string;
        updated_after?: string;
        containing_date?: string;
        start_date?: string;
        end_date?: string;
        page?: number;
        per_page?: number;
      } = {}
    ): Promise<GitLabGroupMilestoneResponse[]> {
      if (!groupId?.trim()) {
        throw new Error("Group ID is required");
      }
      if (options.page !== undefined && options.page < 1) {
        throw new Error("Page number must be 1 or greater");
      }
      if (options.per_page !== undefined && (options.per_page < 1 || options.per_page > 100)) {
        throw new Error("Per page must be between 1 and 100");
      }
    
      const endpoint = `/groups/${encodeURIComponent(groupId)}/milestones`;
      const params = buildSearchParams(options);
    
      const milestones = await gitlabGet<GitLabGroupMilestoneResponse[]>(endpoint, params);
      return z.array(GitLabGroupMilestoneSchema).parse(milestones);
    }
  • The tool request handler switch case in src/server.ts that invokes the API implementation.
    case "list_group_milestones": {
      const args = ListGroupMilestonesSchema.parse(request.params.arguments);
      const { group_id, ...options } = args;
      const milestones = await api.listGroupMilestones(group_id, options);
      return { content: [{ type: "text", text: JSON.stringify(milestones, null, 2) }] };
    }
  • Input validation schema for the list_group_milestones tool.
    export const ListGroupMilestonesSchema = z.object({
      group_id: z.string().describe("Group ID or URL-encoded path"),
      state: z.enum(["active", "closed"]).optional().describe("Return only active or closed milestones"),
      title: z.string().optional().describe("Return only milestones with the given title (case-sensitive)"),
      search: z.string().optional().describe("Return only milestones with title or description matching the string"),
      search_title: z.string().optional().describe("Return only milestones with title matching the string"),
      include_ancestors: z.boolean().optional().describe("Include milestones for all parent groups"),
      include_descendants: z.boolean().optional().describe("Include milestones for group and its descendants"),
      updated_before: z.string().optional().describe("Return only milestones updated before the given datetime (ISO 8601)"),
      updated_after: z.string().optional().describe("Return only milestones updated after the given datetime (ISO 8601)"),
      containing_date: z.string().optional().describe("Return only milestones containing the given date"),
      start_date: z.string().optional().describe("Return only milestones where due_date >= start_date"),
      end_date: z.string().optional().describe("Return only milestones where start_date <= end_date"),
  • src/server.ts:150-153 (registration)
    Tool registration definition in the MCP server setup.
      name: "list_group_milestones",
      description: "List all milestones in a GitLab group",
      inputSchema: zodToJsonSchema(ListGroupMilestonesSchema)
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a list operation, implying read-only behavior, but lacks details on permissions, rate limits, pagination defaults, error handling, or output format. For a tool with 14 parameters and no annotation coverage, this leaves significant gaps in understanding its behavior.

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, clear sentence with zero wasted words. It's front-loaded with the core purpose and efficiently conveys the essential action and scope without unnecessary elaboration, making it easy to parse quickly.

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

Completeness2/5

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

Given the complexity (14 parameters, no annotations, no output schema), the description is insufficient. It doesn't address behavioral aspects like pagination, permissions, or error handling, nor does it explain the return format. For a list operation with many filtering options, more context is needed to use it effectively beyond the schema.

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 schema description coverage is 100%, with all parameters well-documented in the schema itself. The description adds no parameter-specific information beyond implying a 'group_id' is needed. This meets the baseline of 3 since the schema does the heavy lifting, but the description doesn't enhance understanding of parameter usage or interactions.

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 verb ('List') and resource ('milestones in a GitLab group'), making the purpose unambiguous. It distinguishes from sibling tools like 'list_milestones' (likely project-level) by specifying 'group' scope, though it doesn't explicitly contrast with all siblings like 'search_groups' or 'list_issues'.

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 is provided on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_milestones' (likely for projects) or 'search_groups', nor does it specify prerequisites such as needing group access or authentication. The description is purely functional without contextual advice.

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/TheRealChrisThomas/gitlab-mcp-server'

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