Skip to main content
Glama

listTextModels

Retrieve a list of available text models from Pollinations to select the best one for your text generation tasks.

Instructions

List available text models

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for listTextModels. It fetches available text models from the Pollinations API endpoint https://text.pollinations.ai/models and returns them as an object with a 'models' property.
    /**
     * List available text generation models from Pollinations API
     *
     * @returns {Promise<Object>} - Object containing the list of available text models
     */
    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;
      }
    }
  • The schema definition for the listTextModels tool. It defines the tool name as 'listTextModels', provides a description 'List available text models', and specifies an empty input schema (no parameters required).
    /**
     * Schema for the listTextModels tool
     */
    export const listTextModelsSchema = {
      name: 'listTextModels',
      description: 'List available text models',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    };
  • The MCP server handler that routes the 'listTextModels' tool call. When the tool name matches, it calls the listTextModels() function and returns the result as JSON text content, with error handling.
    } 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
        };
      }
  • Import of the listTextModels function from the client library, making it available for use in the MCP server.
    listTextModels,
  • src/index.js:10-28 (registration)
    Import and re-export of listTextModels from the textService module, serving as the central client library entry point.
    import { respondText, listTextModels } from './services/textService.js';
    
    
    // Export all service functions
    export {
      // Image services
      generateImageUrl,
      generateImage,
      editImage,
      generateImageFromReference,
      listImageModels,
    
      // Audio services
      respondAudio,
      listAudioVoices,
    
      // Text services
      respondText,
      listTextModels,
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only says 'List available text models' without disclosing whether the operation is read-only, requires authentication, or has any behavioral constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (5 words) and to the point. It could be slightly more informative, but it is appropriately sized for a simple list operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a simple parameterless tool, but it lacks any mention of the return value format or behavior. Given the absence of an output schema and annotations, more context would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% schema description coverage. According to the guidelines, 0 parameters yields a baseline of 4. The description does not need to add parameter information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'available text models'. It distinguishes from sibling tools 'listAudioVoices' and 'listImageModels' by specifying the 'text' modality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. The sibling tool names imply different modalities, but the description does not state when to use this tool or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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