# list\_recent\_traces

List the newest traces in the server log, oldest first.

read-only · idempotent · MCP tool · [Log](https://komrad.dev/latest/api/log.md)

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.log.v1.LogService/ListRecentTraces \
  -H 'Content-Type: application/json' \
  -d '{}'
```

```bash
komrad rpc list-recent-traces
```

```json
{
  "name": "list_recent_traces",
  "arguments": {}
}
```

Offered by the komrad MCP server to orchestrator agents.

## Request

### ListRecentTracesRequest

| Field | Type | Description |
| --- | --- | --- |
| [`limit`](https://komrad.dev/latest/api/log/list-recent-traces.md#komrad-log-v1-ListRecentTracesRequest-limit) | int32 between 0 and 200 | How many of the newest traces to list. Zero lists twenty. |

## Response

### ListRecentTracesResponse

| Field | Type | Description |
| --- | --- | --- |
| [`traces`](https://komrad.dev/latest/api/log/list-recent-traces.md#komrad-log-v1-ListRecentTracesResponse-traces) | [TraceSummary\[\]](https://komrad.dev/latest/api/log/list-recent-traces.md#komrad-log-v1-TraceSummary) | The newest traces in the log, oldest first. |

## Types

### TraceSummary

TraceSummary is one trace in the server's log.

| Field | Type | Description |
| --- | --- | --- |
| [`trace_id`](https://komrad.dev/latest/api/log/list-recent-traces.md#komrad-log-v1-TraceSummary-trace_id) | string | The trace's id. |
| [`started_at`](https://komrad.dev/latest/api/log/list-recent-traces.md#komrad-log-v1-TraceSummary-started_at) | timestamp | When the trace's first line was written. |
| [`what`](https://komrad.dev/latest/api/log/list-recent-traces.md#komrad-log-v1-TraceSummary-what) | string | The RPC method or loop the trace belongs to. Empty when no line names one. |
| [`lines`](https://komrad.dev/latest/api/log/list-recent-traces.md#komrad-log-v1-TraceSummary-lines) | int32 | How many lines the log has under the trace. |
