{
  "role": "ai-bookkeeper",
  "source": "https://aiinthewild.com/ai-employees/ai-bookkeeper/",
  "note": "Tool definitions in JSON Schema. Wire each one to your own systems. Functions marked approval: true should only create drafts or requests for a person to approve.",
  "functions": [
    {
      "name": "extract_invoice",
      "description": "Read an invoice file and return supplier, number, dates, lines, tax and total.",
      "access": "read",
      "approval": false,
      "parameters": {
        "type": "object",
        "properties": {
          "file_id": {
            "type": "string",
            "description": "The uploaded file"
          }
        },
        "required": [
          "file_id"
        ]
      }
    },
    {
      "name": "find_purchase_order",
      "description": "Find the purchase order and goods receipt for an invoice.",
      "access": "read",
      "approval": false,
      "parameters": {
        "type": "object",
        "properties": {
          "supplier": {
            "type": "string",
            "description": "Supplier name"
          },
          "po_number": {
            "type": "string",
            "description": "PO number"
          }
        },
        "required": [
          "supplier"
        ]
      }
    },
    {
      "name": "suggest_coding",
      "description": "Suggest account, cost center and tax code with a reason.",
      "access": "read",
      "approval": false,
      "parameters": {
        "type": "object",
        "properties": {
          "invoice": {
            "type": "object",
            "description": "Extracted invoice"
          }
        },
        "required": [
          "invoice"
        ]
      }
    },
    {
      "name": "create_bill_draft",
      "description": "Create an unapproved bill in the accounting system.",
      "access": "write",
      "approval": true,
      "parameters": {
        "type": "object",
        "properties": {
          "invoice": {
            "type": "object",
            "description": "Extracted invoice"
          },
          "coding": {
            "type": "object",
            "description": "Accepted coding"
          }
        },
        "required": [
          "invoice",
          "coding"
        ]
      }
    }
  ]
}