Inconsistent pageSize in ListRepoLabelsTool #10

Open
opened 2025-07-11 15:36:43 -05:00 by b3nw · 0 comments
Owner

In operation/label/label.go, the list_repo_labels tool definition sets a DefaultNumber of 100 for pageSize, but the ListRepoLabelsFn handler also contains redundant logic to default it to 100. The mcp framework should handle providing the default value.

Recommendation:
Remove the redundant default-setting logic from the handler function to rely solely on the tool definition.

In `operation/label/label.go`, the `list_repo_labels` tool definition sets a `DefaultNumber` of 100 for `pageSize`, but the `ListRepoLabelsFn` handler also contains redundant logic to default it to 100. The `mcp` framework should handle providing the default value. **Recommendation:** Remove the redundant default-setting logic from the handler function to rely solely on the tool definition.
b3nw added the enhancementlabel-management labels 2025-07-11 15:45:28 -05:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: b3nw/gitea-mcp#10