Skip to main content
Glama

list_templates

Explore available templates for creating MCP servers. Filter by language to find the right starting point for your server setup. Simplify the creation process with AI guidance and pre-built workflows.

Instructions

list available templates for MCP server creation. Args: language: Filter by language (optional) Returns: Formatted list of available templates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNo

Implementation Reference

  • main.py:133-163 (handler)
    MCP tool handler for 'list_templates'. Retrieves templates from TemplateManager and formats them for output.
    @mcp.tool() async def list_templates(ctx: Context, language: str | None = None) -> str: """ list available templates for MCP server creation. Args: language: Filter by language (optional) Returns: Formatted list of available templates """ try: template_manager = ctx.request_context.lifespan_context["template_manager"] templates = await template_manager.list_templates(language=language) if not templates: return "No templates available" result = "📋 Available Templates:\n\n" for lang, template_list in templates.items(): result += f"**{lang.upper()}:**\n" for template in template_list: result += f" • {template['name']}: {template['description']}\n" result += "\n" return result except Exception as e: logger.error(f"Failed to list templates: {e}") return f"❌ Error listing templates: {str(e)}"
  • Core helper method in TemplateManager that lists and filters templates by language, returning structured data.
    async def list_templates(self, language: str | None = None) -> dict[str, list[dict]]: """list templates with optional language filtering.""" result = {} for template in self.templates.values(): if language and template.language != language: continue lang = template.language if lang not in result: result[lang] = [] result[lang].append({ "name": template.name, "description": template.description, "features": template.features, }) return result

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/angrysky56/mcp-creator-mcp'

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