WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Bug: listRepositoryTags tool ignores page and page_size parameters #71

@MuzsaiLajos

Description

@MuzsaiLajos

Bug: listRepositoryTags tool ignores page and page_size parameters

Description

The listRepositoryTags tool defines page and page_size in its interface and sets defaults if they are missing, but it fails to actually include these parameters in the outgoing API request URL.

As a result, it is impossible to paginate through tags or increase the page size. The tool always returns the default first page (usually 10 items), making it impossible to find older tags (e.g., finding wordpress:4.1.1 which is thousands of tags deep in history).

Reproduction Steps

  1. Start the MCP server.

  2. Call the listRepositoryTags tool with a specific page_size:

    {
      "name": "listRepositoryTags",
      "arguments": {
        "namespace": "library",
        "repository": "wordpress",
        "page_size": 100
      }
    }
  3. Observation: The response contains only the default number of items (e.g., 10), ignoring the requested size.

Root Cause Analysis

In the source code for listRepositoryTags, the page and page_size variables are initialized, but they are never added to the params object used to construct the query string.

// ... inside listRepositoryTags ...

if (!page) {
    page = 1;
}
if (!page_size) {
    page_size = 10;
}

let url = `${this.config.host}/namespaces/${namespace}/repositories/${repository}/tags`;
const params: Record<string, string> = {};

// BUG: 'page' and 'page_size' are missing here!
if (architecture) {
    params.architecture = architecture;
}
if (os) {
    params.os = os;
}

// The URL is constructed without pagination params
if (Object.keys(params).length > 0) {
    url += `?${new URLSearchParams(params).toString()}`;
}

Proposed Fix

Update the parameter construction logic to include these fields:

const params: Record<string, string> = {
    page: page.toString(),
    page_size: page_size.toString()
};

if (architecture) {
    params.architecture = architecture;
}
if (os) {
    params.os = os;
}

Environment

  • MCP Server Version: Latest
  • Client: Claude Desktop / Custom Client

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions