feat: issue_list tool #28
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The current toolset has
issue_get(owner, name, number)andissue_create(...)but no way to list issues in a repo. Agents that don't already know an issue number can't discover one without falling back to directgiteaAPI calls (which means asking the user for a token withread:issuescope, defeating the point of the MCP).Concrete blocker hit 2026-05-17: working in
mathias/local-dev, asked for "any fresh issues to work on" — the MCP could not answer without a number, and the credential-helper token in scope didn't haveread:issue. Had to ask the user for the number manually.Gitea API
Query params worth surfacing:
state—open(default) |closed|alllabels— comma-separated label namestype—issues|pulls|all(filter to issues only by default; pulls havepr_*tools)assigned_by/created_by/mentioned_by— optional user filtersmilestones— comma-separated milestone namessince— ISO 8601 timestamp (for "what's new since X")page/limit— pagination (cap at 50 same asrepo_list)Tool spec
Body intentionally omitted from the list response (call
issue_getfor full body) — keeps response size sane for repos with many long issues.Default:
type=issuesserver-side so PRs don't leak into the list (gitea conflates them by default).Acceptance criteria
issue_listregistered incmd/gitea-mcp/main.gorepo_*/issue_*toolsstate=open, defaulttype=issues(PRs excluded)capLimithelper (internal/tools/tool.go)internal/tools/issue_list_test.gowith: happy path, empty result, allowlist rejection, state filter, label filter, since filterListIssues(ctx, owner, name, args)ininternal/gitea/issues.gotask checkgreenOut of scope
issues_searchlaterissue_getfor that