Start a build through a deploy hook
trigger_deploy_hook
Calls one deploy hook now, exactly as its URL would be called, which starts a real publish of the site.
The latest saved version goes live on the site's public address, like pressing Publish. The tool tells the client to run it only when you ask. The response carries status, deploymentId and callId, the row the call wrote to the hook's call log.
Only one build runs per site at a time. When a build is already running, the call succeeds with status already-building and that build's deploymentId, and nothing new is started or queued, which counts as success. A started build comes back with status started once it is claimed, not when it finishes, so follow it with get_publish_status.
A hook that is turned off is refused and starts nothing, and a publish the site cannot make is refused with the reason. A hook called more than 10 times in a minute is refused for the rest of that minute, and retryAfter gives the seconds to wait.
Every call, refused or not, is logged in the hook's call log with the source mcp, or api when the tool is called through the HTTP API. Only the first call refused by the rate limit in a minute is logged. See Deploy hooks.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
hookId |
string | Yes | The hook id from list_deploy_hooks. |