feat: issue_get tool #20

Closed
opened 2026-05-15 06:54:16 +00:00 by mathias · 1 comment
Owner

Summary

Add an issue_get tool to retrieve a single issue by number, including its full body, state, labels, assignees, and comments count.

Gitea API

GET /api/v1/repos/{owner}/{repo}/issues/{index}

Tool spec

tool: issue_get
params:
  owner:  string
  name:   string  // repo name
  number: integer // issue number (>= 1)

Returns

{
  "number": 26,
  "title": "feat: expose ntfy via NPM...",
  "state": "open",
  "body": "...",
  "created_at": "...",
  "updated_at": "...",
  "labels": [],
  "assignees": [],
  "comments": 0,
  "html_url": "..."
}

Required token permission

read:issue scope — no new permissions needed beyond what existing issue tools use.

Risk classification

LOW — read-only.

Implementation notes

  • Follow pattern of repo_get.go exactly
  • No allowlist check needed on repo name (only on owner)
  • Test cases: existing issue, issue not found (404), wrong owner (allowlist rejection)

Motivation

Discovered 2026-05-14: after creating infra issue #26, could not verify its content
from claude.ai without navigating to the web UI. issue_create returns minimal
metadata — issue_get would allow agents to verify issue content post-creation
and read issue details during planning sessions without switching context.

Also useful for: reading issue body before commenting, checking issue state before
creating a duplicate, verifying sprint issues at session start.

## Summary Add an `issue_get` tool to retrieve a single issue by number, including its full body, state, labels, assignees, and comments count. ## Gitea API `GET /api/v1/repos/{owner}/{repo}/issues/{index}` ## Tool spec ``` tool: issue_get params: owner: string name: string // repo name number: integer // issue number (>= 1) ``` ## Returns ```json { "number": 26, "title": "feat: expose ntfy via NPM...", "state": "open", "body": "...", "created_at": "...", "updated_at": "...", "labels": [], "assignees": [], "comments": 0, "html_url": "..." } ``` ## Required token permission `read:issue` scope — no new permissions needed beyond what existing issue tools use. ## Risk classification **LOW** — read-only. ## Implementation notes - Follow pattern of `repo_get.go` exactly - No allowlist check needed on repo name (only on owner) - Test cases: existing issue, issue not found (404), wrong owner (allowlist rejection) ## Motivation Discovered 2026-05-14: after creating infra issue #26, could not verify its content from claude.ai without navigating to the web UI. `issue_create` returns minimal metadata — `issue_get` would allow agents to verify issue content post-creation and read issue details during planning sessions without switching context. Also useful for: reading issue body before commenting, checking issue state before creating a duplicate, verifying sprint issues at session start.
Author
Owner

Shipped in v0.2.4. Closing during cleanup pass.

Shipped in v0.2.4. Closing during cleanup pass.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/gitea-mcp#20