Skip to main content
Glama

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
NameRequiredDescriptionDefault
projectIdYesID of the project to list volumes for

Implementation Reference

  • Handler function for the 'volume_list' MCP tool. Takes projectId and delegates to volumeService.listVolumes.
    async ({ projectId }) => { return volumeService.listVolumes(projectId); }
  • Input schema definition for the 'volume_list' tool using Zod.
    projectId: z.string().describe("ID of the project to list volumes for") }, async ({ projectId }) => {
  • 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 ); }); }
  • 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)}`); } }

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