Azure / Azure/azure-functions-java-worker

Add advanced MCP tool samples

Open
#863 0 comments 0 reactions 1 assignee Claimed by @ahmedmuhsin View on GitHub
mcp-extension
Dominant language
Java
Stars
103
Forks
74
Avg merge
4d 8h
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.