๐Ÿš€ Everything is free โ€” help us improve! Submit feedback and shape the platform.
๐ŸงชTDD Challengeยทintermediateยทโฑ๏ธ 30โ€“45mยทโญ 175 XP

M-051Implement MCP Resource Endpoints

Description

Nebula Corp's MCP server can handle tool calls, but it doesn't expose any resources yet. AI assistants need to browse available data before calling tools. Implement the resource provider so the server can list available resources (customer profiles, order history) and return their contents when requested via resource URIs like 'customer://C001/profile'.

Test Cases (4)

Lists all resources
Should list customer and doc resources
Input:testListResources()
Expected:CONTAINS:customer://C001
Reads customer resource
Should return customer profile data
Input:testReadCustomer()
Expected:CONTAINS:Alice
Reads doc resource
Should return document content
Input:testReadDoc()
Expected:CONTAINS:password
Handles missing resource
Should return error for missing resource
Input:testMissingResource()
Expected:CONTAINS:not found

Related Lessons

Click Run / Check to validate your solution