Fix find_issues MCP tool: use correct Forgejo API endpoint #1

Merged
delandtj merged 1 commit from fix/find-issues-endpoint into development 2026-02-09 16:13:20 +00:00
Member

Summary

  • Fix find_issues tool returning 404 by changing endpoint from non-existent /finder/issues to /repos/issues/search
  • Add RepositoryMeta type and repository field on Issue for cross-repo context
  • Add request_with_headers() method to capture X-Total-Count response header
  • Map MCP assignee username to assigned=true API param + client-side username filtering
  • Rename milestonemilestones, add q search parameter to match Forgejo API
  • Remove unused FinderIssueResult type (replaced by Issue + RepositoryMeta)
  • Update Rhai bindings to convert from Issue instead of FinderIssueResult

Test plan

  • cargo build passes
  • cargo test passes (2/2 tests)
  • Manual: forgejo_find_issues with no params returns issues
  • Manual: forgejo_find_issues with state=open returns open issues
  • Manual: forgejo_find_issues with assignee=delandtj returns assigned issues
  • Manual: forgejo_find_issues with owner=ourworld_it returns org issues
## Summary - Fix `find_issues` tool returning 404 by changing endpoint from non-existent `/finder/issues` to `/repos/issues/search` - Add `RepositoryMeta` type and `repository` field on `Issue` for cross-repo context - Add `request_with_headers()` method to capture `X-Total-Count` response header - Map MCP `assignee` username to `assigned=true` API param + client-side username filtering - Rename `milestone` → `milestones`, add `q` search parameter to match Forgejo API - Remove unused `FinderIssueResult` type (replaced by `Issue` + `RepositoryMeta`) - Update Rhai bindings to convert from `Issue` instead of `FinderIssueResult` ## Test plan - [x] `cargo build` passes - [x] `cargo test` passes (2/2 tests) - [ ] Manual: `forgejo_find_issues` with no params returns issues - [ ] Manual: `forgejo_find_issues` with `state=open` returns open issues - [ ] Manual: `forgejo_find_issues` with `assignee=delandtj` returns assigned issues - [ ] Manual: `forgejo_find_issues` with `owner=ourworld_it` returns org issues
Fix find_issues MCP tool: use correct Forgejo API endpoint
All checks were successful
Build and Test / build (pull_request) Successful in 2m7s
76b346fb4a
The find_issues tool was calling /api/v1/finder/issues which doesn't
exist, causing 404 for all requests. Changed to the correct endpoint
/api/v1/repos/issues/search with proper parameter mapping.

- Add RepositoryMeta type and repository field on Issue
- Add request_with_headers() to capture X-Total-Count header
- Rewrite find_issues() to use /repos/issues/search endpoint
- Map MCP assignee username to assigned=true + client-side filtering
- Rename milestone→milestones, add q search parameter
- Remove unused FinderIssueResult (replaced by Issue + RepositoryMeta)
- Update Rhai bindings to convert from Issue instead of FinderIssueResult
delandtj merged commit 80203b530c into development 2026-02-09 16:13:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_research/forgejo_clients!1
No description provided.