Encode per-endpoint pagination bounds in the operation declarations
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 2h 7m
- Merged PRs (30d)
- 2
Description
Follow-up to #38.
`PageArgs::resolve` applies one global pagination policy (defaults, clamp to 1..=100), but several endpoints have their own bounds the declarations don't express:
- `GET /v2/issues` clamps `count` to a minimum of 5
- `GET /revisions/{locator}/snippets` caps `pageSize` at 50 (currently enforced ad hoc in the `Snippet` `list_page` impl)
Idea: encode per-entity bounds in the param structs / declarations themselves so that
1. both surfaces enforce the same bounds,
2. the MCP input schemas advertise them (agents see constraints instead of discovering them via API errors), and
3. `--help` makes the CLI act as documentation for what each endpoint supports.
Not needed for #38 — deliberately deferred.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with PageArgs::resolve and the parameter structs or operation declarations, then inspect the Snippet list_page implementation for its existing pageSize cap. Check how those declarations generate MCP input schemas and CLI --help output. Done means per-endpoint bounds are expressed once and enforced consistently across both surfaces, with the constraints visible in schemas and help.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100