Skip to main content
Glama

domain_list

List all service and custom domains for a Railway service to view endpoints, manage configurations, and audit domain settings.

Instructions

[API] List all domains (both service and custom) for a service

⚡️ Best for: ✓ Viewing service endpoints ✓ Managing domain configurations ✓ Auditing domain settings

→ Prerequisites: service_list

→ Next steps: domain_create, domain_update

→ Related: service_info, tcp_proxy_list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesID of the project containing the service
environmentIdYesID of the environment that the service is in to list domains from (usually obtained from service_list)
serviceIdYesID of the service to list domains for

Implementation Reference

  • The handler function that executes the 'domain_list' tool logic by calling domainService.listDomains(projectId, environmentId, serviceId).
    async ({ projectId, environmentId, serviceId }) => {
      return domainService.listDomains(projectId, environmentId, serviceId);
    }
  • Zod input schema defining parameters for the 'domain_list' tool: projectId, environmentId, serviceId.
    {
      projectId: z.string().describe("ID of the project containing the service"),
      environmentId: z.string().describe("ID of the environment that the service is in to list domains from (usually obtained from service_list)"),
      serviceId: z.string().describe("ID of the service to list domains for")
    },
  • The registerAllTools function collects tools from various modules, including domainTools (which contains 'domain_list'), and registers them with the MCP server using 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
        );
      });
    } 
  • Export of domainTools array where the 'domain_list' tool is created and defined using createTool, making it available for registration.
    export const domainTools = [
      createTool(
        "domain_list",
        formatToolDescription({
          type: 'API',
          description: "List all domains (both service and custom) for a service",
          bestFor: [
            "Viewing service endpoints",
            "Managing domain configurations",
            "Auditing domain settings"
          ],
          relations: {
            prerequisites: ["service_list"],
            nextSteps: ["domain_create", "domain_update"],
            related: ["service_info", "tcp_proxy_list"]
          }
        }),
        {
          projectId: z.string().describe("ID of the project containing the service"),
          environmentId: z.string().describe("ID of the environment that the service is in to list domains from (usually obtained from service_list)"),
          serviceId: z.string().describe("ID of the service to list domains for")
        },
        async ({ projectId, environmentId, serviceId }) => {
          return domainService.listDomains(projectId, environmentId, serviceId);
        }
      ),
Behavior3/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 of behavioral disclosure. It describes the tool as a list operation, implying it's read-only and non-destructive, which is helpful. However, it lacks details on behavioral traits like pagination, rate limits, authentication needs, or error handling. The description adds some context (e.g., it lists 'both service and custom' domains) but doesn't fully compensate for the absence of annotations.

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 and appropriately sized, using bullet points and icons for clarity. It front-loads the core purpose in the first sentence, followed by organized sections (Best for, Prerequisites, Next steps, Related) that add value without redundancy. Every sentence earns its place by providing actionable guidance, making it efficient and easy to scan.

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?

Given the tool's moderate complexity (3 required parameters, no output schema, no annotations), the description is largely complete. It covers purpose, usage guidelines, and context well. However, it lacks details on output format or behavioral aspects like error handling, which would be beneficial since there's no output schema. The description compensates somewhat with rich contextual guidance but has minor gaps in behavioral transparency.

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%, with all three parameters (projectId, environmentId, serviceId) documented in the schema. The description doesn't add any parameter-specific information beyond what the schema provides, such as explaining relationships between parameters or usage examples. Given the high schema coverage, the baseline score of 3 is appropriate, as the description doesn't enhance parameter understanding but relies on the schema.

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 tool's purpose: 'List all domains (both service and custom) for a service.' It specifies the verb ('List'), resource ('domains'), and scope ('for a service'), distinguishing it from sibling tools like domain_check, domain_create, or domain_update. The mention of 'both service and custom' adds specificity about what types of domains are included.

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 usage guidance with dedicated sections: 'Best for' lists three specific use cases (viewing endpoints, managing configurations, auditing settings), 'Prerequisites' names service_list as a required step, 'Next steps' suggests domain_create and domain_update as follow-ups, and 'Related' mentions service_info and tcp_proxy_list as alternatives. This comprehensively addresses when and how to use the tool versus other options.

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