list-resources
Find and access Web3 research materials to support crypto analysis and decision-making.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/researchTools.ts:487-522 (handler)Inline handler for the 'list-resources' tool. Retrieves all resources using storage.getAllResources(), maps them to a list with details (id, url, title, source, contentLength, fetchedAt), formats as JSON text response, with 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/researchTools.ts:487-522 (registration)Registration of the 'list-resources' tool within registerResearchTools function, with empty input schema and inline handler.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}`, }, ], }; } });