> ## Documentation Index
> Fetch the complete documentation index at: https://doc.featherhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Per-tool z-score anomaly scan vs a rolling baseline (window <= 1 day)



## OpenAPI

````yaml /api-reference/openapi.json get /v1/analytics/tools/monitoring/anomaly-detection
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.87.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/analytics/tools/monitoring/anomaly-detection:
    get:
      tags:
        - analytics
      summary: Per-tool z-score anomaly scan vs a rolling baseline (window <= 1 day)
      operationId: getToolMonitoringAnomalyDetection
      parameters:
        - name: baseline_days
          in: query
          required: false
          schema:
            type: integer
            maximum: 30
            minimum: 1
            default: 7
            title: Baseline Days
        - name: z_threshold
          in: query
          required: false
          schema:
            type: number
            exclusiveMinimum: 0
            default: 2
            title: Z Threshold
        - name: min_invocations
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 5
            title: Min Invocations
        - name: tool_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Tool Id
        - name: tool_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Tool Type
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date
            title: Start Date
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date
            title: End Date
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AnomalyDetectionRow'
                title: Response Gettoolmonitoringanomalydetection
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    AnomalyDetectionRow:
      properties:
        tool_id:
          type: string
          title: Tool Id
        tool_name:
          type: string
          title: Tool Name
        tool_type:
          type: string
          title: Tool Type
        invocation_count:
          type: integer
          title: Invocation Count
        error_count:
          type: integer
          title: Error Count
        current_error_rate:
          type: number
          title: Current Error Rate
        current_p95_latency_ms:
          type: number
          title: Current P95 Latency Ms
        baseline_valid_days:
          type: integer
          title: Baseline Valid Days
        baseline_error_rate_mean:
          anyOf:
            - type: number
            - type: 'null'
          title: Baseline Error Rate Mean
        baseline_error_rate_stddev:
          anyOf:
            - type: number
            - type: 'null'
          title: Baseline Error Rate Stddev
        baseline_p95_latency_mean:
          anyOf:
            - type: number
            - type: 'null'
          title: Baseline P95 Latency Mean
        baseline_p95_latency_stddev:
          anyOf:
            - type: number
            - type: 'null'
          title: Baseline P95 Latency Stddev
        error_rate_zscore:
          anyOf:
            - type: number
            - type: 'null'
          title: Error Rate Zscore
        p95_latency_zscore:
          anyOf:
            - type: number
            - type: 'null'
          title: P95 Latency Zscore
        is_error_rate_anomaly:
          type: integer
          title: Is Error Rate Anomaly
        is_latency_anomaly:
          type: integer
          title: Is Latency Anomaly
        is_anomaly:
          type: integer
          title: Is Anomaly
      type: object
      required:
        - tool_id
        - tool_name
        - tool_type
        - invocation_count
        - error_count
        - current_error_rate
        - current_p95_latency_ms
        - baseline_valid_days
        - is_error_rate_anomaly
        - is_latency_anomaly
        - is_anomaly
      title: AnomalyDetectionRow
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
        retryable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Retryable
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry After
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````