volume_list
List all persistent storage volumes in a Railway project to view configurations, manage data storage, and audit usage.
Instructions
[API] List all volumes in a project
⚡️ Best for: ✓ Viewing persistent storage configurations ✓ Managing data volumes ✓ Auditing storage usage
→ Prerequisites: project_list
→ Next steps: volume_create
→ Related: service_info, database_deploy
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ID of the project to list volumes for |
Implementation Reference
- src/tools/volume.tool.ts:25-27 (handler)Handler function for the 'volume_list' MCP tool. Takes projectId and delegates to volumeService.listVolumes.async ({ projectId }) => { return volumeService.listVolumes(projectId); }
- src/tools/volume.tool.ts:23-25 (schema)Input schema definition for the 'volume_list' tool using Zod.projectId: z.string().describe("ID of the project to list volumes for") }, async ({ projectId }) => {
- src/tools/index.ts:16-37 (registration)Registration of all tools to MCP server, including volumeTools which contains 'volume_list' (spread on line 27).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/services/volume.service.ts:16-39 (helper)The volumeService.listVolumes method providing the core logic for listing and formatting volumes, called by the tool handler.async listVolumes(projectId: string): Promise<CallToolResult> { try { const volumes = await this.client.volumes.listVolumes(projectId); if (volumes.length === 0) { return createSuccessResponse({ text: "No volumes found in this project.", data: [] }); } const volumeDetails = volumes.map(volume => `📦 ${volume.name} (ID: ${volume.id}) Created: ${new Date(volume.createdAt).toLocaleString()}` ); return createSuccessResponse({ text: `Volumes in project:\n\n${volumeDetails.join('\n\n')}`, data: volumes }); } catch (error) { return createErrorResponse(`Error listing volumes: ${formatError(error)}`); } }