Skip to content

Commit 493d799

Browse files
committed
chore: update macro readme
1 parent 6dc3500 commit 493d799

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

crates/rust-mcp-macros/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ assert_eq!(res.mime_type.unwrap(), "image/png");
250250
assert_eq!(res.size.unwrap(), 1024);
251251
assert!(res.icons.len() == 2);
252252
```
253+
👉 Please see [examples/common/resources.rs](https://github.com/rust-mcp-stack/rust-mcp-sdk/blob/main/crates/rust-mcp-sdk/examples/common/resources.rs) and [examples/common/example_server_handler.rs](https://github.com/rust-mcp-stack/rust-mcp-sdk/blob/main/crates/rust-mcp-sdk/examples/common/example_server_handler.rs) for a working example with text and blob resources.
253254

254255

255256
## ➡️ mcp_resource_template Macro
@@ -274,6 +275,9 @@ Generated methods
274275
- `audience` : Intended audiences roles (e.g., ["user", "assistant"]). Resource will use them in the resource annotation and [rust_mcp_schema::Role](https://docs.rs/rust-mcp-schema/latest/rust_mcp_schema/enum.Role.html).
275276
- `icons` : icons (same format as mcp_tool icons ^^).
276277

278+
279+
👉 Please see [examples/common/resources.rs](https://github.com/rust-mcp-stack/rust-mcp-sdk/blob/main/crates/rust-mcp-sdk/examples/common/resources.rs) and [examples/common/example_server_handler.rs](https://github.com/rust-mcp-stack/rust-mcp-sdk/blob/main/crates/rust-mcp-sdk/examples/common/example_server_handler.rs) for a working example showing Pokémon sprites exposed as a dynamic resource.
280+
277281
---
278282

279283
<img align="top" src="assets/rust-mcp-stack-icon.png" width="24" style="border-radius:0.2rem;"> Check out [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk), a high-performance, asynchronous toolkit for building MCP servers and clients. Focus on your app's logic while [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) takes care of the rest!

0 commit comments

Comments
 (0)