listTextModels
Retrieve available text generation models for AI content creation on Pollinations Multimodal MCP Server, enabling access to diverse textual outputs.
Instructions
List available text models
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/textService.js:77-96 (handler)The handler function for the 'listTextModels' tool. It fetches the list of available text models from the Pollinations Text API endpoint and formats the response according to MCP standards.async function listTextModels(params) { try { const url = buildUrl(TEXT_API_BASE_URL, "models"); const response = await fetch(url); if (!response.ok) { throw new Error( `Failed to list text models: ${response.statusText}`, ); } const models = await response.json(); // Return the response in MCP format return createMCPResponse([createTextContent({ models }, true)]); } catch (error) { console.error("Error listing text models:", error); throw error; } }
- src/services/textService.js:146-146 (registration)Registration entry for the 'listTextModels' tool within the textTools export array. This array is imported into src/index.js, spread into toolDefinitions, and each tool is registered via server.tool(...tool). The schema is empty `{}` indicating no input parameters are required.["listTextModels", "List available text models", {}, listTextModels],
- src/index.js:87-87 (registration)Generic registration loop in the MCP server startup that applies server.tool() to all tools, including 'listTextModels' from the imported textTools.toolDefinitions.forEach((tool) => server.tool(...tool));
- src/services/textService.js:146-146 (schema)Empty schema object for the 'listTextModels' tool, indicating no validated input parameters.["listTextModels", "List available text models", {}, listTextModels],