Commit b7c1428
Add outputType parameter to zip tool (inlined / resource link / resource)
This change ports the enhancements from PR #2831 in the modelcontextprotocol/servers
repository to the example-remote-server codebase.
The zip tool now supports three output formats via the 'outputType' parameter:
1. 'inlinedResourceLink' (default) - Returns a resource_link with a data URI
(the original behavior, most efficient for small files)
2. 'resourceLink' - Returns a link to a resource stored in a transient map,
allowing clients to read the resource later via ReadResource requests
3. 'resource' - Returns the full resource object directly inline
This demonstrates best practices for handling multiple output formats and
managing transient resources that can be read after the tool completes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 0d01c5f commit b7c1428
1 file changed
+56
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
| |||
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
| 135 | + | |
129 | 136 | | |
130 | 137 | | |
131 | 138 | | |
| |||
269 | 276 | | |
270 | 277 | | |
271 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
272 | 285 | | |
273 | 286 | | |
274 | 287 | | |
| |||
639 | 652 | | |
640 | 653 | | |
641 | 654 | | |
642 | | - | |
| 655 | + | |
643 | 656 | | |
644 | 657 | | |
645 | 658 | | |
| |||
660 | 673 | | |
661 | 674 | | |
662 | 675 | | |
663 | | - | |
664 | | - | |
665 | | - | |
| 676 | + | |
| 677 | + | |
666 | 678 | | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
676 | 719 | | |
677 | 720 | | |
678 | 721 | | |
| |||
0 commit comments