bucket-query
Run Bucket extension queries on a wiki to retrieve, filter, sort, and limit matching rows, with pagination for large result sets.
Instructions
Runs a Bucket extension query against the targeted wiki. One row per match. Enabled only when the wiki has Bucket installed.
Ground bucket and field names first: schemas are JSON pages in the Bucket: namespace (id 9592). The bucket(...) argument is the page title lowercased with spaces replaced by underscores — page Bucket:Combat achievement is queried as bucket("combat_achievement"). Discover with search-page-by-prefix (namespace 9592 plus a starting-letter prefix), then get-page to read the schema. Field names appear already lowercase-underscored in the schema; pass them verbatim.
Examples:
Lookup: bucket("exchange").select("name","high_alch").where("name","Abyssal whip").run()
Sort: bucket("exchange").select("name","value").orderBy("value","desc").limit(10).run()
Comparator: bucket("exchange").select("name","value").where({"value",">",1000000}).run()
Where syntax: shorthand where("field","value") for equality; table form where({"field","op","value"}) for =, !=, >, <, >=, <=. Compose with Bucket.And/Or/Not. Full Lua reference: https://meta.weirdgloop.org/w/Extension:Bucket/Usage.
Up to 500 rows per call, and only the whole rows that fit in 75000 bytes by default; paginate with continueFrom. Bucket's API is not yet stable upstream — error wording may shift, but errors come through verbatim.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "bucket-query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wiki | No | Wiki to target, as a key from the mcp://wikis/ resources (e.g. en.wikipedia.org), or the full mcp://wikis/ URI. Omit to use the default wiki. | |
| limit | No | Appended as `.limit(N)` before `.run()`. Hard cap 500. | |
| query | Yes | Bucket Lua chain ending in `.run()`. Example: bucket("exchange").select("name","high_alch").where("name","Abyssal whip").run() | |
| continueFrom | No | Pagination token from a prior response (non-negative integer offset). |