{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-registered-function-list-response-schema.json",
  "title": "RegisteredFunctionListResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amigo-functions-api-openapi.yml#/components/schemas/RegisteredFunctionListResponse",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/RegisteredFunctionResponse"
      },
      "type": "array",
      "title": "Items"
    },
    "count": {
      "type": "integer",
      "title": "Count"
    }
  },
  "type": "object",
  "required": [
    "items",
    "count"
  ],
  "$defs": {
    "RegisteredFunctionResponse": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "function_type": {
          "type": "string",
          "title": "Function Type"
        },
        "returns_kind": {
          "type": "string",
          "title": "Returns Kind"
        },
        "description": {
          "type": "string",
          "title": "Description",
          "default": ""
        },
        "when_to_use": {
          "type": "string",
          "title": "When To Use",
          "default": ""
        },
        "parameters": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Parameters"
        },
        "sql_template": {
          "type": "string",
          "title": "Sql Template"
        },
        "input_schema": {
          "additionalProperties": true,
          "type": "object",
          "title": "Input Schema"
        },
        "timeout_ms": {
          "type": "integer",
          "title": "Timeout Ms",
          "default": 30000
        },
        "last_test_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Test At"
        },
        "last_test_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Test Status"
        },
        "last_test_error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Test Error"
        },
        "last_test_duration_ms": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Test Duration Ms"
        },
        "deployed_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deployed At"
        },
        "deployed_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deployed By"
        }
      },
      "type": "object",
      "required": [
        "name",
        "function_type",
        "returns_kind",
        "sql_template"
      ],
      "title": "RegisteredFunctionResponse",
      "description": "Single row from ``platform.functions``."
    }
  }
}