stacklok / stacklok/toolhive

Support for registry server API pagination

Open
#3,069 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cli enhancement registry
Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

Overview

thv registry list [--refresh] returns only the first page of servers from an upstream registry - 100 servers - and there is no mechanism to list more. Also, there's no indication that the result is truncated. Since the ToolHive registry itself is at exactly 100 servers now, using it plus any other source in the toolhive-registry-server leads to this scenario.

Related, thv search <keyword> only searches the partial list.

But thv registry info <some-server> does return server info even if it's not in the first page.

Proposal

  1. Implement pagination support for thv registry list - perhaps a flag like --page-size or -n/--number
  2. Show the total # of servers in the registry and an indication of how many were actually listed (ex, "Listing 100 of 237 servers")
  3. Fix thv search to search over the entire registry

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the thv registry list and thv search <keyword> entry points, then inspect how upstream registry responses are limited to 100 servers. Verify behavior with a registry containing more than one page; done means listing can request more results, reports total versus listed servers, and search covers the entire registry.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.