Gateway Logs
The gateway writes JSON Lines to stdout, one complete record per line, for your process manager, container runtime, or log collector. Records describe what happened without carrying request data: no params, results, file contents, SQL, credentials, or API keys. For the detail behind a failure, see the agent’s local log.
Request events
Each REST capability call and each MCP tools/call writes one request event:
{
"event": "request",
"timestamp": "2026-04-11T10:30:00.000Z",
"request_id": "01J5ABCDEF1234567890ABCDEF01",
"protocol": "rest",
"capability": "get_customer",
"api_key_name": "partner-a",
"http_status": 200,
"executor_kind": "db",
"count": 1,
"returned_rows": 1,
"affected_rows": null,
"file_count": 0,
"response_bytes": 128,
"input_file_count": 0,
"input_file_bytes": 0,
"error_code": null,
"error_message": null,
"duration_ms": 123
}| Field | Meaning |
|---|---|
request_id | Same ID as in the response, for correlating with client logs |
protocol | rest or mcp |
capability | Capability name (empty if an MCP call named no valid tool) |
api_key_name | The key’s configured name |
http_status | HTTP status returned. MCP tool errors return 200 |
executor_kind | db, csv, file, http, or wasm, on success |
count | Rows returned (DB SELECT, CSV) or affected (DB mutation) on success; otherwise null |
returned_rows, affected_rows | The same number split by kind; the other one is null |
file_count | Files returned |
response_bytes | Size of the published data |
input_file_count, input_file_bytes | Files received and their decoded size |
outcome, reason | On failure, the outcome and fixed reason, when known |
error_code, error_message | The public error returned to the caller, or null |
duration_ms | Time to handle the request |
A successful mutation that changed nothing logs count: 0; a failure logs count: null, so the two can be told apart.
MCP requests other than tools/call (initialize, tools/list, notifications) and requests rejected before the tool is known, for example by authentication, do not write request events.
Control events
| Event | Written when |
|---|---|
openapi_cached | The gateway loaded the agent’s contract. Contains only the number of paths |
openapi_snapshot | Same moment, with the full OpenAPI document. Only when GATEWAY_EMIT_OPENAPI_SNAPSHOT=true |
mcp_http_rejected | An MCP request was rejected at the HTTP level, for example by the IP allow list or rate limit. Contains the status and public error |
openapi_snapshot is not filtered per API key: it describes every capability exposed in OpenAPI, including descriptions and schemas. Enable it only when your log pipeline may hold that information.