feat(attachments): [1/4] add infrastructure for dynamic tools and file utilities - #114
Open
nguyenthe-hien wants to merge 1 commit into
Open
feat(attachments): [1/4] add infrastructure for dynamic tools and file utilities#114nguyenthe-hien wants to merge 1 commit into
nguyenthe-hien wants to merge 1 commit 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.
This was referenced May 21, 2026
Contributor
|
@nguyenthe-hien hey man, whenever you have time, please resolve the merge conflicts. |
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 1 of 4 splitting #83 into smaller reviewable units, as requested by @katayama8000.
This PR contains only the foundational infrastructure — no user-visible tools are added yet.
What's in this PR
dynamicToolsfield toToolsettype for tools returning binary contentregisterToolsto register dynamic tools wrapped withbacklogErrorHandlerdynamicTools/toolsetsto expose adynamicflag in the listingstreamToBase64,streamToBuffergetMimeTypebuildFileContent,buildAttachmentResultoptimizeImageForInline@modelcontextprotocol/sdkto^1.29.0and addssharpfor image optimizationFiles: 16
Stacked PR series (please review/merge in order)
Verification
npm run lint✅npm run typecheck✅npm test✅ — 346 tests passCredits
🤖 Generated with Claude Code