Azure / Azure/azure-functions-java-worker

Add advanced MCP tool samples

Đang mở
#863 0 bình luận 0 reaction 1 người được giao Được @ahmedmuhsin nhận Xem trên GitHub
mcp-extension
Ngôn ngữ chính
Java
Star
103
Fork
74
Merge trung bình
4 ngày 8 giờ
Pull request đã merge (30 ngày)
2

Mô tả

## Request

The .NET Azure Functions MCP sample includes advanced MCP tool samples that demonstrate rich content patterns. We need equivalent samples for the Java worker to show developers how to use these features in Java.

### Samples needed (based on .NET reference)

| Sample | What it demonstrates |
|---|---|
| **GenerateQrCode** | Returning a single rich image response (`ImageContentBlock`) — generates a QR code PNG and returns it as base64-encoded content. |
| **GenerateBadge** | Returning multiple content blocks in one tool response (`IList`) — combines text plus an SVG image badge. |
| **GetWebsitePreview** | Returning a text summary + link block (`TextContentBlock` + `ResourceLinkBlock`) — fetches a page's title/description and emits a typed resource link. |
| **GetSnippetWithMetadata** | Returning both content blocks and StructuredContent (JSON metadata) via `CallToolResult` for clients that support structured output. |
| **BatchSaveSnippets** | Batch tool inputs (array/object-style input) — performs multiple blob writes in a single tool invocation. |
| **Snippet POCO** | `[McpContent]`-decorated class — auto-discovery of tool inputs (when used as a trigger parameter) and structured content serialization (when returned). |

### .NET reference samples
https://github.com/Azure-Samples/remote-mcp-functions-dotnet

**Ask:** Add samples demonstrating these MCP tool patterns in the Java Azure Functions worker so developers have references for implementing rich image responses, multi-block outputs, resource links, structured content, and batch inputs.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.