list-resources
Discover and access curated Web3 research resources to enhance your crypto knowledge, powered by the Web3 Research MCP server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/researchTools.ts:487-522 (handler)The inline handler and registration for the 'list-resources' tool. It fetches all resources from the ResearchStorage using getAllResources(), maps them to a list with fields like id, url, title, source, contentLength, and fetchedAt, and returns a text content with the JSON stringified list. Includes error handling.server.tool("list-resources", {}, async () => { try { const resources = storage.getAllResources(); const resourceList = Object.keys(resources).map((id) => ({ id, url: resources[id].url, title: resources[id].title || "No title", source: resources[id].source || "Unknown", contentLength: resources[id].content?.length || 0, fetchedAt: resources[id].fetchedAt, })); return { content: [ { type: "text", text: `Available resources:\n\n${JSON.stringify( resourceList, null, 2 )}`, }, ], }; } catch (error) { return { isError: true, content: [ { type: "text", text: `Error listing resources: ${error}`, }, ], }; } });
- src/tools/index.ts:9-9 (registration)Calls registerResearchTools which registers the 'list-resources' tool among others.registerResearchTools(server, storage);
- src/server.ts:187-187 (registration)Top-level call to registerAllTools, which in turn registers the research tools including 'list-resources'.registerAllTools(server, storage);
- Helper method on ResearchStorage used by the list-resources handler to retrieve all stored resources.getAllResources(): Record<string, any> {