PROMPT 12 Resources Feature
# PROMPT_12: Resources Feature Module **Goal:** Implement `McpClient.Resources` for reading/subscribing to server resources. **Duration:** ~45 minutes | **Dependencies:** PROMPT_01-10 --- ## Implementation **File:** `lib/mcp_client/resources.ex` **API:** - `list/2` - List available resources - `read/3` - Read resource contents - `subscribe/3` - Subscribe to resource updates - `unsubscribe/3` - Unsubscribe from resource - `list_templates/2` - List resource URI templates **Structs:** - `Resource` - {uri, name, description, mimeType} - `ResourceContents` - {contents, uri} - `ResourceTemplate` - {uriTemplate, name, description, mimeType} **Reference:** CLIENT_FEATURES.md § McpClient.Resources, PROTOCOL_DETAILS.md § resources/* --- ## Tests **File:** `test/mcp_client/resources_test.exs` Test all five functions with success/error cases, validation, and notification handling. --- ## Success Criteria ✅ All tests pass | ✅ No warnings | ✅ Format/Credo clean --- **Next:** PROMPT_13 - Prompts feature
fill the variables
This prompt has 3 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{uri, name, description, mimeType}{contents, uri}{uriTemplate, name, description, mimeType}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo nshkrdotcom/mcp_client (MIT). A "PROMPT 12 Resources Feature" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
nshkrdotcom/mcp_client · MIT