PreviewDrop

v0.1.13
dev.previewdrop/cli Checked 6 hours ago Published 2 months ago

Deploy any Git branch to a live HTTPS preview URL from your agent.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_account

Get the authenticated PreviewDrop account info (email, plan, tenant name)

list_projects

List all PreviewDrop projects in the account

list_deployments

List deployments, optionally filtered by project, branch, or status

ParameterTypeDescription
branchstringFilter by branch name
projectIdstringFilter by project ID
statusstringFilter by status: queued | building | deploying | ready | failed | stopped | expired

get_deployment

Get details of a specific deployment by ID

ParameterTypeDescription
id *stringDeployment ID

deploy

Trigger a new preview deployment for a project

ParameterTypeDescription
projectId *stringProject ID to deploy
branchstringBranch to deploy (defaults to project default branch)
waitbooleanPoll until the deployment reaches a terminal state (up to 5 min)

destroy_deployment

Stop and destroy a deployment by ID

ParameterTypeDescription
id *stringDeployment ID to destroy

redeploy

Redeploy an existing deployment by ID (same project + branch)

ParameterTypeDescription
id *stringDeployment ID to redeploy

get_build_logs

Fetch build logs (nixpacks / Dockerfile output) for a deployment

ParameterTypeDescription
id *stringDeployment ID
tailnumberNumber of lines from the end to return (default: 100)

get_runtime_logs

Fetch runtime (container stdout/stderr) logs for a deployment

ParameterTypeDescription
id *stringDeployment ID
tailnumberNumber of lines from the end to return (default: 100)

create_project

Add a repository as a PreviewDrop project. GitHub (default) needs the GitHub App installed on the repo owner's account — if not, use get_github_app_install_url first. GitLab and Bitbucket need the provider connected once in the dashboard under Settings → Integrations.

ParameterTypeDescription
githubRepo *stringRepository path, e.g. acme/my-api (GitLab subgroups allowed: group/subgroup/project)
defaultBranchstringDefault branch to watch (defaults to main)
gitProviderstringGit host of the repository (default: github)
namestringProject display name (defaults to the repo name)

get_github_app_install_url

Returns the GitHub URL where the user must install the PreviewDrop GitHub App. Call this when create_project returns a 403 about the App not being installed.

get_project_env_vars

Get the environment variable keys configured for a project. Values are masked (shown as ***) — use this to see what vars are set without exposing secrets.

ParameterTypeDescription
projectId *stringProject ID

set_project_env_vars

Merge environment variables into a project. Existing vars not in the payload are kept. Values are encrypted at rest.

ParameterTypeDescription
envVars *objectKey-value pairs to set (e.g. { "DATABASE_URL": "postgres://..." })
projectId *stringProject ID

deploy_repo

PRIMARY TOOL — call this immediately for any "preview", "deploy", "get a URL", or "share my project" request. Do NOT read project files or try to run the project locally first. Before calling: (1) run `git remote get-url origin` to get the repo URL and extract owner/repo, (2) run `git rev-parse --abbrev-ref HEAD` for the current branch. This tool auto-creates the project if needed, builds the branch, waits up to 5 minutes, and returns the live HTTPS URL.

ParameterTypeDescription
githubRepo *stringRepository path, e.g. acme/quick-invoice (owner/repo; GitLab subgroups allowed)
branchstringBranch to deploy. Defaults to the project default branch (usually main).
gitProviderstringGit host of the repository (default: github). Derive it from the origin URL host.
projectNamestringDisplay name for the project if it needs to be created (defaults to the repo name).