Read the build log of a publish
get_publish_logs
Reads the build output of a publish, which is where the reason for a failed publish actually lives.
get_publish_status only says that a publish failed, and this says why. Leave out deploymentId for the most recent publish, or name one from list_deployments. A failed publish carries its error alongside the lines.
At most 200 lines come back per call, with total and hasMore, so page with offset. Only the last 1,000 lines of any build are kept at all. See When a publish fails.
Request
Call it with a POST to https://api.modulify.ai/v1/get_publish_logs, sending the inputs below as a JSON object. The token needs the logs:read scope.
It only reads and changes nothing, so retrying it is safe.
curl -X POST https://api.modulify.ai/v1/get_publish_logs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":"PROJECT_ID"}'Over MCP, the same method is the get_publish_logs tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
deploymentId |
string | No | A specific publish, from list_deployments. Leave it out for the most recent one. |
offset |
integer | No | How many lines to skip. The oldest kept line is 0, which is also the default. |
limit |
integer | No | How many lines to return, up to 200. Defaults to 200. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.