-
Notifications
You must be signed in to change notification settings - Fork 64
Description
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
-
Start the MCP server.
-
Call the
listRepositoryTagstool with a specificpage_size:{ "name": "listRepositoryTags", "arguments": { "namespace": "library", "repository": "wordpress", "page_size": 100 } } -
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