asset_models_list
List over 60 image models from the registry with optional filters for free, paid, paste-only, RGBA, or SVG support. Get model IDs, families, providers, and tier info for prompt-to-asset workflows.
Instructions
List the model registry (60+ entries) with optional filters. MCP equivalent of p2a models list. Returns id, family, provider, dialect, native_rgba/svg flags, text ceiling, tier (free/paid/paste-only), key_set status. Filter flags: free, paid, paste_only, rgba, svg. Read-only; no network.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| free | No | Only zero-key / free-tier models. | |
| paid | No | Only paid direct-API models. | |
| paste_only | No | Only paste-only surfaces (Midjourney, Firefly, Krea). | |
| rgba | No | Only models with native transparent-PNG output. | |
| svg | No | Only models with native SVG output. |
Implementation Reference
- The actual handler function `modelsList` that executes the 'asset_models_list' tool logic. It filters MODEL_REGISTRY.models by optional flags (free, paid, paste_only, rgba, svg), enriches each entry with tier/status/key_set info, and returns the filtered list.
export async function modelsList(input: ModelsListInputT): Promise<ModelsListResult> { const avail = detectApiAvailability(); let models = MODEL_REGISTRY.models; if (input.free) models = models.filter((m) => m.free_tier); if (input.paid) models = models.filter((m) => !m.free_tier && !m.paste_only); if (input.paste_only) models = models.filter((m) => m.paste_only); if (input.rgba) models = models.filter((m) => m.native_rgba === true); if (input.svg) models = models.filter((m) => m.native_svg === true); const entries: ModelListEntry[] = models.map((m) => { const pkey = providerKeyForModel(m.id); const keySet = pkey ? avail[pkey] : false; const tier: ModelListEntry["tier"] = m.paste_only ? "paste-only" : m.free_tier ? "free" : "paid"; const status: ModelListEntry["status"] = m.paste_only ? "paste" : keySet ? "ready" : "unset"; const entry: ModelListEntry = { id: m.id, family: String(m.family), provider: m.provider, dialect: String(m.dialect), native_rgba: m.native_rgba, native_svg: m.native_svg, text_ceiling_chars: m.text_ceiling_chars, tier, status, provider_key_env: pkey ? envForKey(pkey) : null, key_set: keySet }; if (m.aka?.length) entry.aka = m.aka; if (m.cost_hint) entry.cost_hint = m.cost_hint; return entry; }); return { total: entries.length, filters_applied: { ...(input.free !== undefined && { free: input.free }), ...(input.paid !== undefined && { paid: input.paid }), ...(input.paste_only !== undefined && { paste_only: input.paste_only }), ...(input.rgba !== undefined && { rgba: input.rgba }), ...(input.svg !== undefined && { svg: input.svg }) }, models: entries }; } - Zod schema `ModelsListInput` defining the input validation for the tool (free, paid, paste_only, rgba, svg as optional booleans).
export const ModelsListInput = z.object({ free: z.boolean().optional().describe("Only zero-key / free-tier models."), paid: z.boolean().optional().describe("Only paid direct-API models."), paste_only: z .boolean() .optional() .describe("Only paste-only surfaces (Midjourney, Firefly, Krea)."), rgba: z.boolean().optional().describe("Only models with native transparent-PNG output."), svg: z.boolean().optional().describe("Only models with native SVG output.") }); - Type alias `ModelsListInputT` inferred from the Zod schema.
export type ModelsListInputT = z.infer<typeof ModelsListInput>; - packages/mcp-server/src/server.ts:552-571 (registration)Tool registration entry in the tools array: defines name 'asset_models_list', description, input schema, and annotations (readOnlyHint, idempotentHint).
{ name: "asset_models_list", description: "List the model registry (60+ entries) with optional filters. MCP equivalent of `p2a models list`. Returns id, family, provider, dialect, native_rgba/svg flags, text ceiling, tier (free/paid/paste-only), key_set status. Filter flags: free, paid, paste_only, rgba, svg. Read-only; no network.", inputSchema: { type: "object", properties: { free: { type: "boolean", description: "Only zero-key / free-tier models." }, paid: { type: "boolean", description: "Only paid direct-API models." }, paste_only: { type: "boolean", description: "Only paste-only surfaces (Midjourney, Firefly, Krea)." }, rgba: { type: "boolean", description: "Only models with native transparent-PNG output." }, svg: { type: "boolean", description: "Only models with native SVG output." } }, required: [] }, annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false } }, - packages/mcp-server/src/server.ts:837-839 (registration)Handler dispatch in server.ts: case 'asset_models_list' calls modelsList(ModelsListInput.parse(args)).
case "asset_models_list": result = await modelsList(ModelsListInput.parse(args ?? {})); break;