Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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; } }
  • 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));
  • Empty schema object for the 'listTextModels' tool, indicating no validated input parameters.
    ["listTextModels", "List available text models", {}, listTextModels],

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tusharpatil2912/pollinations-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server