Skip to main content
Glama

template_list

Discover available deployment templates to plan and initiate service setups on Railway, with search functionality to find specific templates by name or description.

Instructions

[API] List all available templates on Railway

⚡️ Best for: ✓ Discovering available templates ✓ Planning service deployments ✓ Finding template IDs and sources

⚠️ Not for: × Listing existing services × Getting service details

→ Alternatives: service_create_from_repo, service_create_from_image

→ Next steps: service_create_from_template

→ Related: database_list_types

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchQueryNoOptional search query to filter templates by name and description

Implementation Reference

  • Full implementation of the 'template_list' tool using createTool. Includes tool name, formatted description, input schema with optional searchQuery, and handler function that delegates to templatesService.listTemplates(searchQuery). This is the core handler logic for the tool.
    createTool( "template_list", formatToolDescription({ type: 'API', description: "List all available templates on Railway", bestFor: [ "Discovering available templates", "Planning service deployments", "Finding template IDs and sources" ], notFor: [ "Listing existing services", "Getting service details" ], relations: { nextSteps: ["service_create_from_template"], alternatives: ["service_create_from_repo", "service_create_from_image"], related: ["database_list_types"] } }), { searchQuery: z.string().optional().describe("Optional search query to filter templates by name and description"), }, async ({ searchQuery }) => { return templatesService.listTemplates(searchQuery); } ),
  • Input schema for template_list tool: optional searchQuery string to filter templates.
    { searchQuery: z.string().optional().describe("Optional search query to filter templates by name and description"), },
  • Registration of all tools, including templateTools which contains the template_list tool. Imports templateTools and spreads into allTools, then registers each via server.tool(...).
    export function registerAllTools(server: McpServer) { // Collect all tools const allTools = [ ...databaseTools, ...deploymentTools, ...domainTools, ...projectTools, ...serviceTools, ...tcpProxyTools, ...variableTools, ...configTools, ...volumeTools, ...templateTools, ] as Tool[]; // Register each tool with the server allTools.forEach((tool) => { server.tool( ...tool ); }); }
  • src/index.ts:20-20 (registration)
    Top-level call to registerAllTools on the MCP server instance, which registers the template_list tool.
    registerAllTools(server);

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/epitaphe360/railway-mcp'

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