AI Tools and Actions

AI Tools and Actions

When you chat with the Admin AI Assistant, the model isn't guessing answers -- it has a set of tools it can call to read your data and perform actions. This article documents those tools so you understand exactly what the AI can do behind the scenes.

These tools are only available to the admin chat. The member-facing chat has no tools and is read-only.

The Six Admin Tools

# Tool What It Does Modifies Data?
1 create_announcement Drafts a new announcement Yes -- as an inactive draft, after your confirmation
2 create_event Drafts a new event Yes -- as an inactive draft, after your confirmation
3 search_events Finds events by date range or keyword No -- read-only
4 search_people Finds people by name or status No -- read-only
5 update_person_status Updates membership/active status on one person Yes -- after your confirmation
6 query_database Runs read-only counts, lists, averages, group-bys No -- read-only

Confirmation guarantee: Every tool that writes to the database returns a preview first and waits for your explicit "Create" / "Confirm" click. The AI cannot silently modify your data.

1. create_announcement

Drafts a new announcement and shows you a preview.

  • Inputs: title (required), content (required), category (optional: general, urgent, event, ministry)
  • Output: Always saved as is_active = false (draft). You publish it manually from the Announcements list.

2. create_event

Drafts a new event and shows you a preview.

  • Inputs: title (required), starts_at (required, YYYY-MM-DD HH:MM), ends_at (optional), location (optional), description (optional)
  • Output: Saved as inactive. You activate it manually from the Events list.

3. search_events

Finds events without modifying anything.

  • Inputs: start_date, end_date, keyword (all optional)
  • Output: Title, date, time, location for each match.

4. search_people

Finds people by name or membership status.

  • Inputs: name, membership_status (member, regular_attender, visitor, inactive), is_active (boolean) -- all optional
  • Output: Names and basic info, scoped to your permissions (team leaders only see their assigned groups).

5. update_person_status

Updates one person's membership status or active flag.

  • Inputs: person_id (required), membership_status, is_active, reason (optional, e.g. "Moved out of state")
  • Output: Shows current vs. proposed state, then waits for your confirmation. Admin permission required.

6. query_database -- the data DSL

This is the most powerful tool. It accepts a small JSON DSL describing what you want, and the AI converts your natural-language question into the right call.

Schema

{
  "entity": "people | events | groups | announcements | attendance",
  "operation": "count | average | sum | list | min | max | group_by",
  "field": "age | birthdate | created_at | ...",
  "filters": { "...": "..." },
  "group_by": "membership_status | gender | age_group",
  "limit": 20
}

Entities

  • people -- congregation records (with anonymization applied)
  • events -- calendar events
  • groups -- groups and classes
  • announcements -- announcement records
  • attendance -- attendance entries

Operations

Operation What It Does Example Question
count Returns a single number "How many active members?"
average Average of a numeric field "What's the average age of our youth?"
sum Sum of a numeric field "How many total attendance entries last month?"
list Returns rows (capped by limit) "Show me all visitors"
min / max Smallest / largest value "Who is our oldest member?"
group_by Counts grouped by a field "Break down membership by status"

Filter Examples

The AI builds the filters object from your question. Common shapes:

  • {"membership_status": "member"}
  • {"is_active": true}
  • {"gender": "female"}
  • {"age_min": 18, "age_max": 30}
  • {"birth_month": 2} -- February birthdays
  • {"birth_day": 14} -- specific day of month
  • {"created_after": "2026-01-01"}

Sample Translations

You ask AI calls
"How many active members?" entity: people, operation: count, filters: {membership_status: member, is_active: true}
"Average age of women under 40" entity: people, operation: average, field: age, filters: {gender: female, age_max: 40}
"Birthday list for March" entity: people, operation: list, filters: {birth_month: 3}, limit: 50
"Group sizes" entity: groups, operation: list, field: member_count
"Membership status breakdown" entity: people, operation: group_by, group_by: membership_status

Audit Logging

Every tool execution is logged with:

  • The tool name and arguments
  • The acting user's ID
  • The church ID
  • Timestamp

Each tool request and each confirmed action is recorded in the system log so you can see exactly what the AI did and when.

Safety Recap

  • No deletes. No tool can delete records.
  • Drafts only. All create_* tools save as inactive.
  • Preview + confirm. Every write requires your explicit confirmation click.
  • Permission-scoped. Tools respect your role; team leaders cannot query data outside their groups.
  • Read-only by default. Four of the six tools are pure reads.

Related Articles

We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies

More