---
title: get_deployment_build_logs
product: vercel
url: /docs/agent-resources/vercel-mcp/tools/deployments/get_deployment_build_logs
canonical_url: "https://vercel.com/docs/agent-resources/vercel-mcp/tools/deployments/get_deployment_build_logs"
last_updated: 2018-10-20
type: reference
prerequisites:
  - /docs/agent-resources/vercel-mcp/tools/deployments
  - /docs/agent-resources/vercel-mcp/tools
related:
  []
summary: Use get_deployment_build_logs with Vercel MCP.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# get_deployment_build_logs

Get the build logs for a deployment by ID or URL, to investigate why a build failed. Returns the most recent lines by default (where build errors appear). Use errorsOnly to see just the failing lines. Omit since and until for latest logs. Use since to narrow the window, and omit until when the end should be the current time.

## Parameters

| Parameter    | Type    | Required | Default  | Description                                                                                                                                                                             |
| ------------ | ------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `idOrUrl`    | string  | Yes      | -        | The unique identifier or hostname of the deployment.                                                                                                                                    |
| `direction`  | string  | No       | `"tail"` | Which end of the build log to return. "tail" (default) returns the most recent lines, where build errors appear. "head" returns the earliest lines. Allowed values: `"tail"`, `"head"`. |
| `errorsOnly` | boolean | No       | `false`  | Return only error, stderr, exit, and fatal events.                                                                                                                                      |
| `limit`      | number  | No       | `100`    | Maximum number of log lines to return.                                                                                                                                                  |
| `since`      | string  | No       | -        | Start of the window as an ISO date or relative lookback from now (e.g. "1h", "30m").                                                                                                    |
| `until`      | string  | No       | -        | Optional end of the window as an ISO date, relative lookback, or "now". Omit this when the end should be the current time.                                                              |
| `buildId`    | string  | No       | -        | Filter to a specific build ID (bld\_...) for multi-build deployments.                                                                                                                   |
| `teamId`     | string  | Yes      | -        | The team ID or slug. Use the team that owns the resource.                                                                                                                               |


---

[View full sitemap](/docs/sitemap)
