Tail Logs
logs_tailReturns recent runtime logs (container stdout/stderr and HTTP
request logs) for a single environment's live Cloud Run service.
Takes the app_id returned by apps_list and the environment_id
returned by environments_list.
Optional limit caps the number of lines returned (default 100,
maximum 500). Optional since / until (ISO 8601) set the time
window; since defaults to the last 10 minutes, and omitting
until leaves the upper bound open (no timestamp<= clause). A
timestamp without an offset is read as UTC. The response echoes the
resolved since / until in UTC, with server_time, the server's
current time in UTC, so you know the window that was actually
queried. A since more than 5 minutes after server_time is
refused, because it could only return nothing: check the offset. When
the environment was never deployed (base_url null in
environments_list), the response carries a note saying it has no
runtime, so no logs.
Optional deployment_id (from deployments_list) scopes the tail
to that deployment's Cloud Run revision. Without it, the tail is
service-wide and can include output from a previously live revision
on the same service. The response echoes deployment_id when the
result was revision-scoped.
Optional min_severity (DEBUG/INFO/NOTICE/WARNING/ERROR/
CRITICAL/ALERT/EMERGENCY, case-insensitive) is a floor, not
an exact match. HTTP request logs are mostly INFO, so a floor of
WARNING or above effectively narrows the result to container
output plus failed requests.
Optional contains (max 200 characters) is a server-side substring
match against log message text and request URLs, filtered in Cloud
Logging before limit truncation, so a match outside the most
recent N lines is not silently lost. Log content is whatever the
app itself writes to stdout/stderr.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"app_id": "<app_id>",
"environment_id": "<environment_id>"
},
"name": "logs_tail"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of log lines to return. Default 100, maximum 500. | |
| since | No | ISO 8601 timestamp, read as UTC without an offset. Only return lines at or after this time. Defaults to the last 10 minutes. Refused when more than 5 minutes after the server time. | |
| until | No | ISO 8601 timestamp, read as UTC without an offset. Only return lines at or before this time. Omitted: no upper bound. | |
| app_id | Yes | The app uuid returned by `apps_list`. | |
| contains | No | Substring to match in log message text or request URL (max 200 characters). Matched server-side before limit truncation. | |
| min_severity | No | Severity floor: DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, or EMERGENCY (case-insensitive). | |
| deployment_id | No | Scope to one deployment's Cloud Run revision (uuid from `deployments_list`). Omitted: service-wide, which can include a previously live revision. | |
| environment_id | Yes | The environment uuid returned by `environments_list`. | |
| organization_id | No | An organisation uuid or slug. When supplied, `app_id` is resolved within that organisation and may be a slug instead of a uuid, mirroring the Meridian web app. |