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);
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates the tool's scope (listing all available templates) and hints at its read-only nature through the 'List' action, though it doesn't explicitly mention permissions, rate limits, or pagination. The 'Next steps' section adds useful context about subsequent actions.

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

Conciseness5/5

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

The description is well-structured with bullet points and icons for readability, front-loading the core purpose. Every sentence earns its place by providing clear guidance, exclusions, alternatives, and related tools without redundancy.

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

Completeness4/5

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

For a simple list tool with one optional parameter and no output schema, the description is highly complete. It covers purpose, usage guidelines, and context thoroughly. The only minor gap is the lack of explicit mention of output format or pagination, but this is reasonable given the tool's simplicity.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents the optional 'searchQuery' parameter. The description doesn't add any parameter-specific information beyond what's in the schema, but the baseline score of 3 is appropriate given the high schema coverage.

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 explicitly states the tool's purpose as 'List all available templates on Railway' with a specific verb ('List') and resource ('templates'), clearly distinguishing it from sibling tools like service_list, database_list_types, or volume_list. The '[API]' prefix further clarifies it's an API operation.

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

Usage Guidelines5/5

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

The description provides explicit guidance with 'Best for' and 'Not for' sections, naming specific use cases (discovering templates, planning deployments) and exclusions (listing existing services, getting service details). It also lists alternatives (service_create_from_repo, service_create_from_image) and related tools (database_list_types), offering comprehensive context for when to use this tool.

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

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