Skip to Content

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 }
FieldMeaning
request_idSame ID as in the response, for correlating with client logs
protocolrest or mcp
capabilityCapability name (empty if an MCP call named no valid tool)
api_key_nameThe key’s configured name
http_statusHTTP status returned. MCP tool errors return 200
executor_kinddb, csv, file, http, or wasm, on success
countRows returned (DB SELECT, CSV) or affected (DB mutation) on success; otherwise null
returned_rows, affected_rowsThe same number split by kind; the other one is null
file_countFiles returned
response_bytesSize of the published data
input_file_count, input_file_bytesFiles received and their decoded size
outcome, reasonOn failure, the outcome and fixed reason, when known
error_code, error_messageThe public error returned to the caller, or null
duration_msTime 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

EventWritten when
openapi_cachedThe gateway loaded the agent’s contract. Contains only the number of paths
openapi_snapshotSame moment, with the full OpenAPI document. Only when GATEWAY_EMIT_OPENAPI_SNAPSHOT=true
mcp_http_rejectedAn 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.