list_models
View available AI models and their pricing on SolanaProx to select the right model for your needs.
Instructions
List all available AI models on SolanaProx with their pricing.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:324-342 (handler)Handler for 'list_models' tool that fetches capabilities from the API and formats the list of available AI models with their providers and pricing information
case "list_models": { const capabilities = await getCapabilities(); const modelList = capabilities.models ?.map( (m: any) => `• ${m.id}\n Provider: ${m.provider}\n Cost: $${m.pricing?.input_per_1m || "?"}/1M input tokens` ) .join("\n\n"); return { content: [ { type: "text", text: `🤖 Available Models on SolanaProx\n\n${modelList || "Claude Sonnet 4, GPT-4 Turbo"}\n\nPay with SOL or USDC. Deposit at ${SOLANAPROX_URL}`, }, ], }; } - src/index.ts:102-111 (schema)Tool schema definition for 'list_models' - defines the tool name, description, and input schema (no parameters required)
{ name: "list_models", description: "List all available AI models on SolanaProx with their pricing.", inputSchema: { type: "object", properties: {}, required: [], }, }, - src/index.ts:192-196 (helper)Helper function that fetches capabilities from the SolanaProx API, including available models and their pricing
async function getCapabilities(): Promise<any> { const res = await fetch(`${SOLANAPROX_URL}/api/capabilities`); if (!res.ok) throw new Error("Failed to fetch capabilities"); return res.json(); } - src/index.ts:245-247 (registration)Registration of the tools array (containing list_models) with the MCP server's ListToolsRequestSchema handler
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });