Skip to main content
Glama

list_templates

Browse available AI model templates and their schemas for image generation using the Replicate API.

Instructions

List all available templates with their schemas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The list_templates tool handler function that iterates over the TEMPLATES dictionary and returns a structured dictionary with each template's schema, description, and version.
    def list_templates() -> dict[str, Any]: """List all available templates with their schemas.""" return { name: { "schema": template["parameter_schema"], "description": template.get("description", ""), "version": template.get("version", "1.0.0"), } for name, template in TEMPLATES.items() }
  • The @mcp.tool() decorator registers the list_templates function as an MCP tool on the FastMCP server instance.
    def list_templates() -> dict[str, Any]: """List all available templates with their schemas.""" return { name: { "schema": template["parameter_schema"], "description": template.get("description", ""), "version": template.get("version", "1.0.0"), } for name, template in TEMPLATES.items() }
  • Definition of the TEMPLATES dictionary used by list_templates, aggregating various preset configurations.
    TEMPLATES: dict[str, dict[str, Any]] = { "quality": QUALITY_PRESETS, "style": STYLE_PRESETS, "aspect_ratio": ASPECT_RATIO_PRESETS, "negative_prompt": NEGATIVE_PROMPT_PRESETS, }

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/gerred/mcp-server-replicate'

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