Skip to main content
Glama

service_list

List all services in a Railway project to get an overview, find service IDs, and check service status.

Instructions

[API] List all services in a specific Railway project

⚡️ Best for: ✓ Getting an overview of a project's services ✓ Finding service IDs ✓ Checking service status

→ Prerequisites: project_list

→ Next steps: service_info, deployment_list

→ Related: project_info, variable_list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesID of the project to list services from

Implementation Reference

  • Registration of the 'service_list' tool using createTool. Includes tool name, formatted description with relations, input schema, and thin handler delegating to serviceService.
    createTool(
      "service_list", // TODO: update this tool to also return the status of the service
      formatToolDescription({
        type: 'API',
        description: "List all services in a specific Railway project",
        bestFor: [
          "Getting an overview of a project's services",
          "Finding service IDs",
          "Checking service status",
        ],
        relations: {
          prerequisites: ["project_list"],
          nextSteps: ["service_info", "deployment_list"],
          related: ["project_info", "variable_list"]
        }
      }),
      {
        projectId: z.string().describe("ID of the project to list services from")
      },
      async ({ projectId }) => {
        return serviceService.listServices(projectId);
      }
    ),
  • Input schema for service_list tool: requires projectId string.
      projectId: z.string().describe("ID of the project to list services from")
    },
  • Execution handler for the service_list tool.
    async ({ projectId }) => {
      return serviceService.listServices(projectId);
    }
  • Helper method listServices in ServiceService: fetches project services, gets latest deployment status for each, formats a user-friendly list with status and URLs.
      async listServices(projectId: string) {
        try {
          const services = await this.client.services.listServices(projectId);
    
          if (services.length === 0) {
            return createSuccessResponse({
              text: "No services found in this project.",
              data: []
            });
          }
    
          // Get latest deployment status for each service
          const serviceDetails = await Promise.all(services.map(async (service: Service) => {
            try {
              const deployments = await this.client.deployments.listDeployments({
                projectId,
                serviceId: service.id,
                limit: 1
              });
              
              const latestDeployment = deployments[0];
              if (latestDeployment) {
                return `🚀 ${service.name} (ID: ${service.id})
    Status: ${latestDeployment.status}
    URL: ${latestDeployment.url || 'Not deployed'}`;
              }
              
              return `🚀 ${service.name} (ID: ${service.id})
    Status: No deployments`;
            } catch {
              return `🚀 ${service.name} (ID: ${service.id})`;
            }
          }));
    
          return createSuccessResponse({
            text: `Services in project:\n\n${serviceDetails.join('\n\n')}`,
            data: services
          });
        } catch (error) {
          return createErrorResponse(`Error listing services: ${formatError(error)}`);
        }
      }
  • Final MCP server registration: spreads serviceTools (including service_list) into allTools and calls server.tool for each.
    allTools.forEach((tool) => {
      server.tool(
        ...tool
      );
    });
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. It mentions the tool lists 'all services' and implies it's a read operation, but doesn't disclose behavioral traits like pagination, rate limits, error handling, or authentication needs. The description adds some context (e.g., it's for listing) but lacks depth on operational behavior.

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 front-loaded with the core purpose, followed by bullet points for usage, prerequisites, and related tools. Every sentence earns its place, with no wasted words, 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 low complexity (1 parameter, no output schema, no annotations), the description is fairly complete for a list operation. It covers purpose, usage, and workflow context. However, it lacks details on output format or behavioral aspects, which slightly limits completeness for an agent.

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 documents the single parameter (projectId). The description adds no additional meaning beyond what's in the schema, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate.

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 with a specific verb ('List') and resource ('services in a specific Railway project'), distinguishing it from siblings like service_info (detailed info) or service_create (creation). It explicitly mentions what it returns: an overview, service IDs, and status.

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' scenarios (overview, finding IDs, checking status), prerequisites (project_list), next steps (service_info, deployment_list), and related tools (project_info, variable_list). This clearly indicates when to use it versus alternatives.

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