Skip to content

feat(attachments): [2/4] add list tools for issue, wiki, and pull request#115

Open
nguyenthe-hien wants to merge 2 commits into
nulab:mainfrom
nguyenthe-hien:pr2-attachment-list-tools
Open

feat(attachments): [2/4] add list tools for issue, wiki, and pull request#115
nguyenthe-hien wants to merge 2 commits into
nulab:mainfrom
nguyenthe-hien:pr2-attachment-list-tools

Conversation

@nguyenthe-hien
Copy link
Copy Markdown

Summary

Part 2 of 4 splitting #83 into smaller reviewable units, as requested by @katayama8000.

Adds three list tools that return attachment metadata (JSON) and wires them into the existing issue, wiki, and git toolsets.

What's in this PR (new layer)

  • getIssueAttachmentsTool
  • getWikiAttachmentsTool
  • getPullRequestAttachmentsTool
  • Registration in src/tools/tools.ts

Depends on

Files: 23 total (7 new in this PR + 16 from PR 1)

Stacked PR series (please review/merge in order)

Important for reviewers: the 4 PRs are designed to be reviewed and merged sequentially. All branches base on main, so later PRs' diffs include earlier PRs' code until they are merged.

Recommended merge order:

  1. feat(attachments): [1/4] add infrastructure for dynamic tools and file utilities #114 — Infrastructure
  2. #THIS — List tools
  3. Download tools (next)
  4. Transfer tool + README

Original combined PR: #83 (will be closed once these are merged).

Verification

  • npm run lint
  • npm run typecheck
  • npm test ✅ — 357 tests pass

🤖 Generated with Claude Code

…ities

Foundational plumbing for attachment download tools (no user-visible tools yet):

- Add `dynamicTools` field to `Toolset` type for binary-returning tools
- Extend `registerTools` to register dynamic tools wrapped with backlog error handler
- Update `dynamicTools/toolsets` to expose `dynamic` flag in listing
- Add utilities: streamToBase64, streamToBuffer, getMimeType,
  buildFileContent, buildAttachmentResult, optimizeImageForInline
- Bump @modelcontextprotocol/sdk to ^1.29.0 and add `sharp` for image optimization

Part 1/4 of splitting nulab#83 into reviewable units.
Adds three list tools that return attachment metadata (JSON) for issues,
wiki pages, and pull requests, and wires them into the `issue`, `wiki`,
and `git` toolsets.

- getIssueAttachmentsTool
- getWikiAttachmentsTool
- getPullRequestAttachmentsTool

Part 2/4 of splitting nulab#83 into reviewable units. Depends on PR 1 (infrastructure).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant