Home/Tools/@tpmjs/tools-railway

redeployService

@tpmjs/tools-railway

Trigger a redeploy of a Railway service in an environment.

Official
ops
v0.2.0
MIT

Interactive Playground

Test @tpmjs/tools-railway (redeployService) 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 { redeployService } from '@tpmjs/tools-railway';

3. Use with AI SDK

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

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

console.log(result.text);

Signature

(serviceId: string, environmentId: string) => Promise<unknown>

Tags

agent
deployment
environment
hosting
ops
railway
redeploy
service
tpmjs
trigger

Parameters

Available configuration options

Auto-extracted
serviceId
Required
Type: string

The Railway service ID to redeploy.

environmentId
Required
Type: string

The Railway environment ID to redeploy in.

Schema extracted: 3/1/2026, 4:29:19 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