# List trace spans

Tool: `veryfront__list_project_trace_spans`

List trace spans. Requires project.logs.read.

## Arguments

| Name                | Type                                     | Required | Description                                                                                              |
| ------------------- | ---------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------- |
| `cursor`            | string                                   |          | Opaque continuation from page\_info.next or page\_info.prev.                                             |
| `limit`             | integer · min 1 · max 1000 · default 200 |          | Max spans to return (default: 200, max: 1000).                                                           |
| `status`            | string                                   |          | Optional span status filter. Use ok, error, unset, or unknown. One of `ok`, `error`, `unset`, `unknown`. |
| `sort_order`        | string · default asc                     |          | Order by span start time. Defaults to "asc". One of `asc`, `desc`.                                       |
| `project_reference` | string                                   |          | Project ID or slug                                                                                       |
| `trace_id`          | string                                   | Yes      | Trace ID to page through.                                                                                |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__list_project_trace_spans",
    "arguments": {
      "trace_id": "string"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"data\":[{\"span_id\":\"string\",\"parent_span_id\":\"string\",\"name\":\"string\",\"service\":\"string\",\"started_at\":\"string\",\"ended_at\":\"string\",\"duration_ms\":0,\"status\":\"ok\",\"status_message\":\"string\",\"attributes\":{},\"events\":[{\"name\":\"string\",\"timestamp\":\"string\",\"attributes\":{}}]}],\"page_info\":{\"self\":\"string\",\"first\":null,\"next\":\"string\",\"prev\":\"string\"}}"
      }
    ],
    "structuredContent": {
      "data": [
        {
          "span_id": "string",
          "parent_span_id": "string",
          "name": "string",
          "service": "string",
          "started_at": "string",
          "ended_at": "string",
          "duration_ms": 0,
          "status": "ok",
          "status_message": "string",
          "attributes": {},
          "events": [
            {
              "name": "string",
              "timestamp": "string",
              "attributes": {}
            }
          ]
        }
      ],
      "page_info": {
        "self": "string",
        "first": null,
        "next": "string",
        "prev": "string"
      }
    }
  }
}
```
