feat(attachments): [3/4] add download tools for issue, wiki, and pull request#116
Open
nguyenthe-hien wants to merge 3 commits into
Open
feat(attachments): [3/4] add download tools for issue, wiki, and pull request#116nguyenthe-hien wants to merge 3 commits into
nguyenthe-hien wants to merge 3 commits into
Conversation
…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).
Adds three dynamic tools that download attachment binary content and return it as MCP `image` (inline, for image MIME types) or `resource` (blob) based on the detected MIME type. - getIssueAttachmentTool - getWikiAttachmentTool - getPullRequestAttachmentTool Wired into the `issue`, `wiki`, and `git` toolsets as dynamic tools so their binary output is registered through the dynamic-tool path. Part 3/4 of splitting nulab#83 into reviewable units. Depends on PR 2 (list tools).
This was referenced May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 3 of 4 splitting #83 into smaller reviewable units, as requested by @katayama8000.
Adds three dynamic tools that download attachment binary content and return it as MCP
image(inline, when MIME type is an image) orresource(blob) otherwise.What's in this PR (new layer)
getIssueAttachmentTool(dynamic)getWikiAttachmentTool(dynamic)getPullRequestAttachmentTool(dynamic)issue,wiki, andgittoolsets underdynamicToolsDepends on
dynamicToolsregistration path and file utilities)tools.tsregistration)This branch sits on top of PRs 1 and 2, so its diff against
mainincludes their changes. Review only the new layer (download tools); earlier layers are reviewed in #114 and #115.Files: 29 total (6 new in this PR + 23 from PRs 1+2)
Stacked PR series (please review/merge in order)
Verification
npm run lint✅npm run typecheck✅npm test✅ — 385 tests pass🤖 Generated with Claude Code