Skip to main content
Glama

list_milestones

Retrieve milestones from a GitLab project to track progress and manage project timelines effectively.

Instructions

List all milestones in a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
stateNo
pageNo
per_pageNo

Implementation Reference

  • The handler function `listMilestones` that performs the API call to list milestones for a project.
    export async function listMilestones(
      projectId: string,
      state?: "active" | "closed",
      page: number = 1,
      perPage: number = 20
    ): Promise<GitLabMilestoneResponse[]> {
      if (!projectId?.trim()) {
        throw new Error("Project ID is required");
      }
      if (page < 1) {
        throw new Error("Page number must be 1 or greater");
      }
      if (perPage < 1 || perPage > 100) {
        throw new Error("Per page must be between 1 and 100");
      }
    
      const endpoint = `/projects/${encodeProjectId(projectId)}/milestones`;
      const params = buildSearchParams({
        ...(state && { state }),
        page: page.toString(),
        per_page: perPage.toString()
      });
    
      const milestones = await gitlabGet<GitLabMilestoneResponse[]>(endpoint, params);
      return z.array(GitLabMilestoneSchema).parse(milestones);
    }
  • Zod schema `ListMilestonesSchema` defining the input validation for the tool.
    export const ListMilestonesSchema = z.object({
      project_id: z.string(),
      state: z.enum(["active", "closed"]).optional(),
      page: z.number().optional(),
      per_page: z.number().optional()
    });
  • src/server.ts:129-133 (registration)
    Registration of the `list_milestones` tool in `server.ts`.
    {
      name: "list_milestones",
      description: "List all milestones in a GitLab project",
      inputSchema: zodToJsonSchema(ListMilestonesSchema)
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but only states the basic action. It doesn't mention whether this is a read-only operation, how pagination works (despite 'page' and 'per_page' parameters), what authentication is required, rate limits, or what the return format looks like. This leaves significant gaps for a tool with 4 parameters.

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 gets straight to the point with zero wasted words. It's appropriately sized for a basic list operation and front-loads the essential information.

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?

For a tool with 4 parameters, 0% schema description coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain the tool's behavior, parameter meanings, return values, or differentiation from siblings. The conciseness comes at the expense of necessary contextual information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate but adds no parameter information. It doesn't explain what 'project_id' represents, what 'state' filtering does, or how pagination parameters work. The description provides no semantic context beyond what's minimally implied by the tool name.

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 ('List') and resource ('milestones in a GitLab project'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_group_milestones' or 'list_issues', which would require specifying what makes milestones distinct from those other list operations.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'list_milestones' over 'list_group_milestones' or other list tools, nor does it specify prerequisites or context for usage beyond the basic action.

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