Skip to main content
Glama

volume_delete

Delete a volume from a service to remove unused storage and manage resources on Railway.app infrastructure. Use for storage cleanup after backing up data.

Instructions

[API] Delete a volume from a service

⚡️ Best for: ✓ Removing unused storage ✓ Storage cleanup ✓ Resource management

⚠️ Not for: × Temporary data removal × Data backup (use volume_backup first)

→ Prerequisites: volume_list

→ Related: service_update

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
volumeIdYesID of the volume to delete

Implementation Reference

  • Registration of the 'volume_delete' MCP tool using createTool, including detailed description, input schema (volumeId: string), and handler function that calls volumeService.deleteVolume
    createTool(
      "volume_delete",
      formatToolDescription({
        type: 'API',
        description: "Delete a volume from a service",
        bestFor: [
          "Removing unused storage",
          "Storage cleanup",
          "Resource management"
        ],
        notFor: [
          "Temporary data removal",
          "Data backup (use volume_backup first)"
        ],
        relations: {
          prerequisites: ["volume_list"],
          related: ["service_update"]
        }
      }),
      {
        volumeId: z.string().describe("ID of the volume to delete")
      },
      async ({ volumeId }) => {
        return volumeService.deleteVolume(volumeId);
      }
    )
  • Input schema for volume_delete tool using Zod
    {
      volumeId: z.string().describe("ID of the volume to delete")
    },
  • Handler function for volume_delete tool execution
    async ({ volumeId }) => {
      return volumeService.deleteVolume(volumeId);
    }
  • volumeService.deleteVolume implementation, handles error/success responses and calls client.volumes.deleteVolume
    async deleteVolume(volumeId: string): Promise<CallToolResult> {
      try {
        const success = await this.client.volumes.deleteVolume(volumeId);
        
        if (success) {
          return createSuccessResponse({
            text: "✅ Volume deleted successfully",
            data: { success }
          });
        } else {
          return createErrorResponse("Failed to delete volume");
        }
      } catch (error) {
        return createErrorResponse(`Error deleting volume: ${formatError(error)}`);
      }
    }
  • VolumeRepository.deleteVolume executes the GraphQL mutation to delete the volume via Railway API client
    async deleteVolume(volumeId: string): Promise<boolean> {
      const data = await this.client.request<{ volumeDelete: boolean }>(`
        mutation volumeDelete($volumeId: String!) {
          volumeDelete(volumeId: $volumeId)
        }
      `, { volumeId });
    
      return data.volumeDelete;
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates that this is a destructive operation ('Delete'), implies permanent removal ('Storage cleanup'), and mentions a prerequisite action ('volume_list'). However, it doesn't specify authentication requirements, rate limits, or error conditions, leaving some behavioral aspects uncovered.

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 with clear sections (purpose, best for, not for, prerequisites, related), uses bullet points and symbols for readability, and contains no redundant information. Every sentence serves a distinct purpose in guiding tool selection and usage.

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?

For a destructive tool with no annotations and no output schema, the description does an excellent job covering purpose, usage guidelines, and prerequisites. It could be more complete by mentioning potential side effects (e.g., data loss irreversibility) or output expectations, but it's largely sufficient given the context.

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% for the single parameter 'volumeId', which is fully documented in the schema. The description doesn't add any parameter-specific information beyond what the schema provides, so it meets the baseline score of 3 for adequate coverage without extra value.

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 specific action ('Delete a volume from a service') with the resource ('volume'), distinguishing it from siblings like volume_create, volume_list, and volume_update. It provides a precise verb+resource combination that leaves no ambiguity about the tool's function.

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 includes explicit 'Best for' and 'Not for' sections with specific use cases (e.g., 'Removing unused storage' vs. 'Temporary data removal'), mentions prerequisites ('volume_list'), and references alternatives ('use volume_backup first'). This provides comprehensive guidance on when to use this tool versus others.

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