Skip to main content
Glama

listTextModels

Discover available text models on the MCPollinations Multimodal MCP Server to generate diverse AI-driven text outputs without authentication requirements.

Instructions

List available text models

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that fetches the list of available text models from the Pollinations Text API endpoint and returns them in { models } format.
    export async function listTextModels() { try { const response = await fetch('https://text.pollinations.ai/models'); if (!response.ok) { throw new Error(`Failed to list text models: ${response.statusText}`); } const models = await response.json(); return { models }; } catch (error) { log('Error listing text models:', error); throw error; } }
  • Schema definition for the listTextModels tool, specifying its name, description, and empty input schema (no parameters required).
    export const listTextModelsSchema = { name: 'listTextModels', description: 'List available text models', inputSchema: { type: 'object', properties: {} } };
  • src/schemas.js:32-44 (registration)
    The listTextModelsSchema is registered by being included in the array returned by getAllToolSchemas(), which is used by the MCP server to list available tools.
    export function getAllToolSchemas() { return [ generateImageUrlSchema, generateImageSchema, editImageSchema, generateImageFromReferenceSchema, listImageModelsSchema, respondAudioSchema, listAudioVoicesSchema, respondTextSchema, listTextModelsSchema ]; }
  • MCP server CallToolRequestSchema handler dispatches tool calls named 'listTextModels' by invoking listTextModels() and formatting the result as MCP content.
    } else if (name === 'listTextModels') { try { const result = await listTextModels(); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error listing text models: ${error.message}` } ], isError: true }; }
  • MCP server registers all tools (including listTextModels via its schema) by setting the ListToolsRequestSchema handler to return getAllToolSchemas().
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getAllToolSchemas() }));

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/pinkpixel-dev/MCPollinations'

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