Azure / Azure/azure-functions-java-worker

Add advanced MCP tool samples

Aperta
#863 0 commenti 0 reazioni 1 assegnatario Rivendicata da @ahmedmuhsin Vedi su GitHub
mcp-extension
Lingua principale
Java
Stelle
103
Fork
74
Merge medio
4g 8h
PR unite (30g)
2

Descrizione

## 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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.