Please leave messages that need to be read on Tony Sidaway's talk page

This bot is approved and doesn't need a flag.  Except for tests, it's inactive.

The software it runs is called .  It's open source (BSD license) and written in compiled Chicken Scheme.

Purpose
This is to be a general purpose query engine for English Wikipedia, using a simple functional programming interface to permit queries of varying complexity to be performed, and the results delivered to a nominated page in the user's userspace and, optionally, sent to the user's enabled email address.

Query language
The query language is based on scheme, a dialect of the lisp family.  If you can write a simple lisp expression you can query this bot.

Typical query functions will look like:

 (whatlinkshere PAGE)
 Produces a list of pages that link to the page.
 (editorsof PAGE [datetime-since [datetime-to]]))
 Produces a list of unique usernames and IP numbers identifying all editors of the page
 (editsof PAGE [datetime-since [datetime-to]])
 Produces a list of edits to the page
 (editsby USERNAME/IP [datetime-since [datetime-to]])
 Produces a list of edits by the user
 (apply EXPR [PAR...] LIST)
 Applies the single expression, with optional parameters, to the list
 (map EXPR [PAR...] [LIST...])
 Maps the single expression, with optional parameters, to the each member of the list.
 (list [EXPR...])
 Composes a list of the expressions
 (email EXPR)
 Sends the result of evaluating the expression in email.  The result will also appear on the wiki.

Using the bot
To register to use the bot, you must edit the bulleted list of usernames at User:TonyBot/Users to add a link to a page in your userspace.  If you simply add your userpage (User:Example), then TonyBot will use the page User:Example/TonyBot to communicate with you.  If you add another page in your userspace, then it will use that page instead of User:Example/TonyBot.

To make a query, edit your TonyBot page to add the query.  TonyBot will execute the query and edit your TonyBot page to provide a link to a page containing the results.  This will be at User:TonyBot/Example/N where N is a numeric value which has meaning only to the bot.

Limitations
 Queries that take too long to execute may be stopped before completion
 Queries that are judged too complex will be rejected
 Queries that return very large volumes of data may be rejected or cut short.

The value of "too long", "too complex" and "very large" may vary over time in an unpredictable way.

Conditions of use
This bot is an experimental service and is provided as-is.  Queries are run at the discretion of the bot operator and subject to the operational requirements of Wikipedia's services.  It may be subject to unplanned outages, and may disappear without warning, at the discretion of the operator and subject to the wishes of the community.

All queries must be made by registered Wikipedia users, in public, on the wiki.  The bot owner reserves the right, for good reason and with the interests of Wikipedia in mind, to refuse access to any user.  The reason for refusal will be stated publicly on the user's talk page and may be subject to revision if you can somehow successfully cajole, persuade or provide reasonable reassurances.

 See also
 Bot policy (WP:BOT)
 Wikipedia:Bots/Requests_for_approval/TonyBot