Skip to main content
Glama

volume_update

Modify volume properties such as name using a structured input schema for managing Railway infrastructure efficiently.

Instructions

Update a volume's properties

Input Schema

NameRequiredDescriptionDefault
nameYesNew name for the volume
volumeIdYesID of the volume to update

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "name": { "description": "New name for the volume", "type": "string" }, "volumeId": { "description": "ID of the volume to update", "type": "string" } }, "required": [ "volumeId", "name" ], "type": "object" }

Implementation Reference

  • Registration of the volume_update MCP tool via createTool. Includes tool name, description, Zod input schema (volumeId, name), and handler that calls volumeService.updateVolume.
    createTool( "volume_update", "Update a volume's properties", { volumeId: z.string().describe("ID of the volume to update"), name: z.string().describe("New name for the volume") }, async ({ volumeId, name }) => { return volumeService.updateVolume(volumeId, name); } ),
  • Handler logic in volumeService.updateVolume: prepares input, calls client API, formats success/error responses.
    async updateVolume(volumeId: string, name: string): Promise<CallToolResult> { try { const input = { name }; const volume = await this.client.volumes.updateVolume(volumeId, input); return createSuccessResponse({ text: `✅ Volume updated successfully to "${volume.name}" (ID: ${volume.id})`, data: volume }); } catch (error) { return createErrorResponse(`Error updating volume: ${formatError(error)}`); } }
  • Type definition for VolumeUpdateInput used in service/repo layers.
    export interface VolumeUpdateInput { name: string; }
  • Repository helper: executes GraphQL mutation to update volume name.
    async updateVolume(volumeId: string, input: VolumeUpdateInput): Promise<Volume> { const data = await this.client.request<{ volumeUpdate: Volume }>(` mutation volumeUpdate($input: VolumeUpdateInput!, $volumeId: String!) { volumeUpdate(input: $input, volumeId: $volumeId) { createdAt id name projectId } } `, { input, volumeId }); return data.volumeUpdate; }
  • Top-level registration of all tools including volumeTools (which contains volume_update) with the MCP server.
    allTools.forEach((tool) => { server.tool( ...tool ); });

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/jason-tan-swe/railway-mcp'

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