list_models
Retrieve all QuiverAI models with supported operations (svg_generate, svg_vectorize, etc.) and pricing to select the right model for your task.
Instructions
List all models available on QuiverAI, including supported operations (svg_generate, svg_vectorize, etc.) and pricing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:364-387 (handler)Tool handler for 'list_models' that calls quiver.models.listModels(), asserts the response shape, formats model data (id, name, supportedOperations, pricing, description) into Markdown, and returns it as text content.
if (name === "list_models") { const response = await quiver.models.listModels(); const result = response.result; assertListModels(result); const formatted = result.data .map((m) => { const ops = m.supportedOperations?.join(", ") ?? "—"; const price = m.pricing ? `prompt: ${m.pricing.prompt} / completion: ${m.pricing.completion}` : "—"; return ( `**${m.id}**${m.name ? ` (${m.name})` : ""}` + `\n operations: ${ops}` + `\n pricing: ${price}` + (m.description ? `\n ${m.description}` : "") ); }) .join("\n\n"); return { content: [{ type: "text" as const, text: formatted }], }; } - src/index.ts:44-67 (schema)Type-narrowing helper assertListModels that validates the API response has the expected shape (data array with id, name, description, supportedOperations, pricing fields).
/** Narrow result to ListModelsResponse or throw. */ function assertListModels( result: unknown ): asserts result is { data: Array<{ id: string; name?: string; description?: string; supportedOperations?: string[]; pricing?: { prompt: string; completion: string }; }>; } { if ( typeof result !== "object" || result === null || !("data" in result) || !("object" in result) ) { const err = result as { message?: string }; throw new Error( `QuiverAI API error: ${err.message ?? JSON.stringify(result)}` ); } } - src/index.ts:260-269 (registration)Tool registration for 'list_models' in the ListToolsRequestSchema handler, with description and empty inputSchema (no parameters).
{ name: "list_models", description: "List all models available on QuiverAI, including supported operations " + "(svg_generate, svg_vectorize, etc.) and pricing.", inputSchema: { type: "object", properties: {}, }, }, - src/index.ts:44-67 (helper)assertListModels is a type assertion helper that validates the listModels API response structure.
/** Narrow result to ListModelsResponse or throw. */ function assertListModels( result: unknown ): asserts result is { data: Array<{ id: string; name?: string; description?: string; supportedOperations?: string[]; pricing?: { prompt: string; completion: string }; }>; } { if ( typeof result !== "object" || result === null || !("data" in result) || !("object" in result) ) { const err = result as { message?: string }; throw new Error( `QuiverAI API error: ${err.message ?? JSON.stringify(result)}` ); } }