Skip to main content
Query recent traces for the current project. Use this after inspecting project logs or when investigating slow or failing requests. Use get_project_trace with a trace_id for full detail.

Tool details

FieldValue
Namesearch_project_traces
GroupTraces

Playground

Input schema

Input schema
{
  "type": "object",
  "properties": {
    "project_reference": {
      "type": "string",
      "description": "Project ID or slug"
    },
    "start": {
      "type": "string",
      "format": "date-time",
      "description": "Start time in ISO 8601 format."
    },
    "end": {
      "type": "string",
      "format": "date-time",
      "description": "End time in ISO 8601 format."
    },
    "limit": {
      "type": "number",
      "minimum": 1,
      "maximum": 100,
      "description": "Max traces to return (default: 20, max: 100).",
      "default": 20
    },
    "service": {
      "type": "string",
      "maxLength": 200,
      "description": "Optional service.name filter."
    },
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "error",
        "unset"
      ],
      "description": "Optional trace status filter."
    },
    "min_duration_ms": {
      "type": "number",
      "minimum": 0,
      "description": "Optional minimum trace duration in milliseconds."
    }
  },
  "required": [
    "project_reference"
  ],
  "additionalProperties": false,
  "description": "Input schema for the search_project_traces tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output schema

Output schema
{
  "type": "object",
  "properties": {
    "traces": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "trace_id": {
            "type": "string",
            "description": "The trace id associated with this tool result."
          },
          "root_span_name": {
            "type": "string",
            "description": "The root span name associated with this tool result."
          },
          "root_service": {
            "type": "string",
            "description": "The root service associated with this tool result."
          },
          "started_at": {
            "type": "string",
            "description": "The started at associated with this tool result."
          },
          "duration_ms": {
            "type": "number",
            "description": "The duration ms associated with this tool result."
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "error",
              "unset",
              "unknown"
            ],
            "description": "Lifecycle status for the returned record."
          },
          "span_count": {
            "type": "number",
            "description": "The span count associated with this tool result."
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "One service item associated with this tool result."
            },
            "description": "List of services associated with this tool result."
          },
          "project_id": {
            "type": "string",
            "description": "Project identifier associated with this result."
          },
          "project_slug": {
            "type": "string",
            "description": "The project slug associated with this tool result."
          }
        },
        "required": [
          "trace_id",
          "root_span_name",
          "root_service",
          "started_at",
          "duration_ms",
          "status",
          "span_count",
          "services",
          "project_id"
        ],
        "additionalProperties": false,
        "description": "One trace item associated with this tool result."
      },
      "description": "List of traces associated with this tool result."
    },
    "stats": {
      "type": "object",
      "properties": {
        "query_time_ms": {
          "type": "number",
          "description": "The query time ms associated with this tool result."
        }
      },
      "required": [
        "query_time_ms"
      ],
      "additionalProperties": false,
      "description": "Structured stats details associated with this tool result."
    }
  },
  "required": [
    "traces",
    "stats"
  ],
  "additionalProperties": false,
  "description": "Structured result returned by the search_project_traces tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}