get_featured_coins
Retrieve a curated list of featured cryptocurrencies from the Pump.fun platform, allowing users to filter results by offset, limit, and NSFW content preferences.
Instructions
Get a list of featured coins
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| offset | No | The offset to start from (default: 0) | |
| limit | No | The number of coins to return (default: 24) | |
| includeNsfw | No | Include NSFW coins (default: true) |
Implementation Reference
- index.ts:84-92 (handler)Handler logic for the 'get_featured_coins' tool: sets the API URL to fetch featured coins from pump.fun and returns the JSON data.case "get_featured_coins": url = PUMP_FUN_API_URL+'/coins/for-you'; return { content: [{ type: "text", text: JSON.stringify((await fetchPumpFunData(url, args))) }], isError: false, };
- index.ts:18-25 (schema)Input schema for the 'get_featured_coins' tool, defining optional parameters: offset, limit, includeNsfw.inputSchema: { type: "object", properties: { offset: { type: "number", description: "The offset to start from (default: 0)", default: 0 }, limit: { type: "number", description: "The number of coins to return (default: 24)", default: 24 }, includeNsfw: { type: "boolean", description: "Include NSFW coins (default: true)", default: true }, } },
- index.ts:15-26 (registration)Registration of the 'get_featured_coins' tool in the TOOLS array, including name, description, and schema.{ name: "get_featured_coins", description: "Get a list of featured coins", inputSchema: { type: "object", properties: { offset: { type: "number", description: "The offset to start from (default: 0)", default: 0 }, limit: { type: "number", description: "The number of coins to return (default: 24)", default: 24 }, includeNsfw: { type: "boolean", description: "Include NSFW coins (default: true)", default: true }, } }, },
- index.ts:56-74 (helper)Helper function to make authenticated API requests to pump.fun endpoints, used by the get_featured_coins handler.async function fetchPumpFunData(url: string, params: any) { const headers = { 'accept': '*/*', 'accept-language': 'en-US,en;q=0.9', 'content-type': 'application/json', 'origin': 'https://pump.fun', 'priority': 'u=1, i', 'referer': 'https://pump.fun/', 'sec-ch-ua': '"Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36' }; const response = await axios.get(url, { params, headers }); if (response.status !== 200 || !response.data) { throw new Error(`Failed to fetch data: ${response.status}`); } return response.data; }
- index.ts:152-154 (registration)Registers the CallToolRequestSchema handler which dispatches to handleToolCall based on tool name, enabling execution of get_featured_coins.server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}) );