Home/Tools/@tpmjs/tools-railway

restartDeployment

@tpmjs/tools-railway

Restart a running Railway deployment.

Official
ops
v0.2.0
MIT

Interactive Playground

Test @tpmjs/tools-railway (restartDeployment) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-railway
pnpm add @tpmjs/tools-railway
yarn add @tpmjs/tools-railway
bun add @tpmjs/tools-railway
deno add npm:@tpmjs/tools-railway

2. Import the tool

import { restartDeployment } from '@tpmjs/tools-railway';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { restartDeployment } from '@tpmjs/tools-railway';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { restartDeployment },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Signature

(id: string) => Promise<unknown>

Tags

agent
deployment
hosting
ops
railway
restart
running
tpmjs

Parameters

Available configuration options

Auto-extracted
id
Required
Type: string

The Railway deployment ID to restart.

Schema extracted: 3/1/2026, 4:28:18 AM

README

@tpmjs/tools-railway

Railway API tools for AI agents. Manage projects, services, deployments, variables, and logs via Railway's GraphQL API.

Installation

npm install @tpmjs/tools-railway

Setup

Set the RAILWAY_TOKEN environment variable. Get your token from Railway Account Tokens.

export RAILWAY_TOKEN=your-token-here

Usage

import { listProjects, getDeployment, getBuildLogs } from '@tpmjs/tools-railway';

// List all projects
const projects = await listProjects.execute({});

// Get deployment details
const deployment = await getDeployment.execute({ id: 'deployment-id' });

// Get build logs
const logs = await getBuildLogs.execute({ deploymentId: 'deployment-id', limit: 50 });

Tools

Projects

ToolDescription
listProjectsList all projects in your account or workspace
getProjectGet project details with services and environments

Services

ToolDescription
getServiceGet service details by ID
getServiceInstanceGet service config for a specific environment

Deployments

ToolDescription
listDeploymentsList deployments for a service/environment
getDeploymentGet deployment details by ID
redeployServiceTrigger a redeploy
restartDeploymentRestart a running deployment

Logs

ToolDescription
getBuildLogsGet build logs for a deployment
getDeploymentLogsGet runtime logs for a deployment

Variables

ToolDescription
getVariablesGet environment variables for a service
upsertVariableCreate or update an environment variable
deleteVariableDelete an environment variable

License

MIT

Statistics

Downloads/month

56

GitHub Stars

10

Quality Score

86%

Bundle Size

NPM Keywords

tpmjs
railway
deployment
hosting
agent

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai