Skip to main content
Glama
adsandcode

mcp-server-taiwan-lottery

by adsandcode

mcp-server-taiwan-lottery

讓 AI 助理和程式直接查台灣彩券的官方開獎結果:最新一期、歷史開獎、對獎、號碼出現次數、開獎時間。號碼全部來自台灣彩券官方 API,查不到就說查不到,不會自己補。

說明與完整開獎資料:playsport539.com

一個套件兩種用法:MCP 伺服器(給 Claude 這類 AI 助理用),以及指令列工具 taiwan-lottery(給腳本、排程用)。

能做什麼

  • 查某個遊戲最新一期的號碼、特別號(大樂透)或第二區(威力彩)、本期各獎項的中獎注數與每注獎金

  • 用期別或日期查某一期;那天沒開獎會直接告訴你哪幾天才開

  • 列出某個月,或最近 N 期的號碼

  • 對獎:輸入你的號碼,回答對中哪幾個、是哪一個獎項,並附上官方的中獎條件原文

  • 統計最近 N 期每個號碼出現幾次、隔了幾期沒開

  • 開獎日、開獎時間,以及官方 API 給的下一期開獎日

每個結果都有 more 欄位,附 1 到 3 個 playsport539.com 的相關頁面(歷史開獎、統計、對獎、開獎時間),想看完整資料可以點過去。先說清楚:playsport539.com 是一個台灣彩券開獎與運動比分網站,網站上有廣告。

想直接在網頁上看,常用的幾頁:

Related MCP server: mcp-taiwan-legal-db

支援的遊戲

代號

遊戲

也可以打

對獎會判定的獎項

開獎

539

今彩539

今彩、daily539

頭獎、貳獎、參獎、肆獎

週一至週六 20:30

lotto649

大樂透

649

頭獎到柒獎、普獎(特別號自動比對)

週二、週五 20:30

superlotto

威力彩

super_lotto638

頭獎到玖獎、普獎(要給第二區號碼)

週一、週四 20:30

3d

3星彩

三星彩

壹獎、貳獎、參獎(有一種組合不判定,見下方)

週一至週六 20:30

4d

4星彩

四星彩

壹獎、貳獎、參獎(同上)

週一至週六 20:30

39m

39樂合彩

39_m5

二合、三合、四合

用今彩539的號碼

49m

49樂合彩

49_m6

二合、三合、四合

用大樂透的號碼(不含特別號)

bingo

賓果賓果

賓果

只列出對中的號碼,不判定獎項

每天 07:05 到 23:55,每 5 分鐘一期

38m

38樂合彩

38_m6

二合到五合

已不在官方開獎時程,資料到 2023-12

lotto1224

雙贏彩

1224

頭獎到肆獎

已不在官方開獎時程,資料到 2023-12

中文名稱直接打就可以,例如「今彩539」「大樂透」「威力彩」;簡體(大乐透、宾果)與「三星」「四星」「威力」這種簡稱也認得。「樂透」這種泛稱不認,因為分不出是哪一個遊戲。

安裝

不需要任何 API 金鑰。建議用 Node.js 20 以上。

Node.js 18 也能跑,但安裝時會看到 EBADENGINE 警告:官方 MCP SDK(@modelcontextprotocol/sdk)帶進來的 @hono/node-server 標註要 Node.js 20 以上。這個套件只用 stdio 連線,不會載入它,所以警告不影響執行(把它整個刪掉再跑伺服器與指令列的測試,結果照樣全過)。如果你的 npm 開了 engine-strict,Node.js 18 會直接裝不起來(npm 文件:開了 engine-strict 就拒絕安裝標註不相容目前 Node.js 版本的套件)。

Claude Desktop

在 claude_desktop_config.json 加上:

{
  "mcpServers": {
    "taiwan-lottery": { "command": "npx", "args": ["-y", "mcp-server-taiwan-lottery"] }
  }
}

Claude Code

claude mcp add taiwan-lottery -- npx -y mcp-server-taiwan-lottery

指令列

npx -y -p mcp-server-taiwan-lottery taiwan-lottery latest 539

或是 npm install -g mcp-server-taiwan-lottery 之後直接打 taiwan-lottery。

指令列範例

以下都是實際執行的輸出(2026-10-23 早上,台灣時間)。

$ taiwan-lottery latest 539
今彩539 第 115000256 期 2026-10-22(週四)
開獎號碼(由小到大):03 08 14 23 28
開出順序:03 28 23 14 08
獎項(本期官方公布):
  頭獎          4 注 每注 6,000,000 元
  貳獎        249 注 每注 20,000 元
  參獎      7,153 注 每注 300 元
  肆獎     74,792 注 每注 50 元
銷售金額:32,953,350 元
兌獎期限:2027-01-22

說明:
  - 官方資料不是即時的:台灣彩券官網常見問題寫明每晚 21:30 公告當日獎號、22:00 公告開獎結果(各獎項注數與獎金)。21:30 以前查不到當期是正常的,22:00 以前可能還沒有獎金資料。
  - 資料取自台灣彩券官方 API,一切以台灣彩券官方公告為準。

更多:
  今彩539開獎號碼  https://playsport539.com/lottery/539/
  今彩539歷史開獎  https://playsport539.com/lottery/539/history/
$ taiwan-lottery check 大樂透 02 05 19 07 11 25
大樂透 第 115000098 期 2026-10-20
你的號碼:02 05 19 07 11 25
開獎號碼:02 05 19 33 40 43 特別號 06
對中:02 05 19(3 個)
結果:普獎(對中當期獎號之任三碼)
本期普獎每注:400 元(官方公布)

說明:
  - 沒有指定期別,這裡對的是官方資料裡最新的一期(第 115000098 期,2026-10-20)。請確認和彩券上的期別相同。
  - 官方資料不是即時的:台灣彩券官網常見問題寫明每晚 21:30 公告當日獎號、22:00 公告開獎結果(各獎項注數與獎金)。21:30 以前查不到當期是正常的,22:00 以前可能還沒有獎金資料。
  - 對獎結果僅供參考,兌獎以彩券本身及台灣彩券官方兌獎結果為準。
  - 資料取自台灣彩券官方 API,一切以台灣彩券官方公告為準。

更多:
  大樂透對獎  https://playsport539.com/lottery/lotto649/check/
  大樂透玩法與獎項  https://playsport539.com/lottery/lotto649/rules/
  大樂透開獎號碼  https://playsport539.com/lottery/lotto649/
$ taiwan-lottery schedule 威力彩
威力彩 開獎時間
開獎日:週一、週四
時間:20:30(台灣時間)
下一期:2026-10-26(週一) 第 115000086 期
官網公布:台灣彩券官網每晚 21:30 公告當日獎號、22:00 公告開獎結果
來源:https://www.taiwanlottery.com/run_lottery/schedule/ https://www.taiwanlottery.com/customer_service/faq/

說明:
  - 官方資料不是即時的:台灣彩券官網常見問題寫明每晚 21:30 公告當日獎號、22:00 公告開獎結果(各獎項注數與獎金)。21:30 以前查不到當期是正常的,22:00 以前可能還沒有獎金資料。
  - 資料取自台灣彩券官方 API,一切以台灣彩券官方公告為準。

更多:
  威力彩開獎時間  https://playsport539.com/lottery/superlotto/schedule/
  威力彩玩法與獎項  https://playsport539.com/lottery/superlotto/rules/
  威力彩開獎號碼  https://playsport539.com/lottery/superlotto/
$ taiwan-lottery stats 539 --last 30
今彩539 最近 30 期的歷史出現次數(2026-09-18 第 115000227 期 ~ 2026-10-22 第 115000256 期)
出現最多:30 14 08 20 34
出現最少:37 11 12 35 07
號碼:次數/上次出現
  01: 3次/2期前    02: 5次/8期前    03: 5次/0期前    04: 3次/1期前    05: 4次/13期前
  06: 4次/9期前    07: 2次/12期前   08: 6次/0期前    09: 4次/5期前    10: 2次/4期前
  11: 1次/13期前   12: 1次/3期前    13: 5次/7期前    14: 7次/0期前    15: 5次/1期前
  16: 5次/3期前    17: 4次/12期前   18: 4次/1期前    19: 4次/7期前    20: 6次/4期前
  21: 2次/10期前   22: 2次/3期前    23: 4次/0期前    24: 4次/5期前    25: 4次/5期前
  26: 4次/4期前    27: 3次/11期前   28: 5次/0期前    29: 3次/14期前   30: 9次/2期前
  31: 3次/11期前   32: 5次/4期前    33: 4次/14期前   34: 6次/6期前    35: 1次/28期前
  36: 3次/2期前    37: 0次/未開     38: 5次/2期前    39: 3次/4期前

說明:
  - 每一期開獎都是獨立的隨機事件,過去出現的次數不能預測下一期。以下只是歷史出現次數的統計。
  - 資料取自台灣彩券官方 API,一切以台灣彩券官方公告為準。

更多:
  今彩539號碼出現次數統計  https://playsport539.com/lottery/539/hot-cold/
  今彩539歷史開獎  https://playsport539.com/lottery/539/history/
  今彩539開獎號碼  https://playsport539.com/lottery/539/

「0期前」是最新一期有開出,「未開」是這 30 期都沒有開出。

$ taiwan-lottery draw 539 --date 2026-10-18
taiwan-lottery: 2026-10-18(週日)沒有今彩539的開獎資料。今彩539的開獎日是週一至週六。

完整用法:

taiwan-lottery latest <遊戲>
taiwan-lottery draw <遊戲> --period <期別> | --date <YYYY-MM-DD>
taiwan-lottery list <遊戲> [--month YYYY-MM | --last N | --date YYYY-MM-DD]
taiwan-lottery check <遊戲> <號碼...> [--second N] [--period N]
taiwan-lottery stats <遊戲> [--last N]
taiwan-lottery schedule <遊戲>
taiwan-lottery games
taiwan-lottery --selftest | --help | --version

加上 --json 會輸出 JSON。威力彩對獎用 --second 給第二區號碼,3星彩、4星彩直接打數字,例如 taiwan-lottery check 3d 073。號碼之間只能用空白、逗號或頓號(、)隔開;小數點、負號或其他符號會直接報錯,不會被當成分隔(3.8 14 23 28 是寫錯的四個號碼,不會被讀成五個)。

結束代碼

意思

0

完成(包含「沒中獎」)

1

官方資料沒有這一期,或還沒更新

2

參數錯誤、官方 API 失敗,或自我測試沒過

MCP 工具

工具

輸入

回傳

latest_draw

game

最新一期:期別、日期、號碼(由小到大與開出順序)、特別號或第二區、本期各獎項注數與每注獎金

get_draw

game,加 period 或 date

指定的一期。賓果賓果一天 203 期,要給期別

list_draws

game,加 month(YYYY-MM)或 last_n(最多 100,預設 10);賓果賓果用 date

多期的號碼(不含獎金表)

check_ticket

game、numbers,威力彩加 second_zone,可選 period(預設最新一期)

對中的號碼、獎項名稱、官方中獎條件原文、該期這個獎項的每注獎金

number_stats

game、last_n(預設 30,最多 200)

每個號碼的出現次數、隔幾期沒開、出現最多與最少的號碼,附「每期獨立」的說明

draw_schedule

game

開獎日與時間、官方 API 的下一期開獎日、官方公告、官網公布結果的時間

全部是唯讀工具。輸入有誤、查無此期、官方 API 失敗時,回傳 isError,kind 分別是 input、not_found、upstream,訊息是中文。

伺服器啟動時會先跑一次自我測試(用錄下來的官方回應,不連網路),測試沒過就拒絕啟動。指令列也一樣,先過自我測試才回答。

資料來源與延遲

  • 資料來源:台灣彩券官方 API https://api.taiwanlottery.com/TLCAPIWeB/Lottery/。用到的端點(Daily539Result、Lotto649Result、SuperLotto638Result、3DResult、4DResult、39M5Result、49M6Result、38M6Result、Lotto1224Result、BingoResult、LatestBingoResult、NextDrawDate、ExceptionNotice)是從 www.taiwanlottery.com 網頁的 JavaScript 找出來的,2026-10-23 逐一實際呼叫確認過。

  • 官方資料會延遲。 台灣彩券官網常見問題寫明:官網每晚 21:30 公告當日獎號、22:00 公告開獎結果。所以 21:30 以前查不到當天那一期是正常的,22:00 以前可能只有號碼、還沒有獎金。這個工具查不到就回報查不到,不會用其他網站的號碼補上。(另外有一次觀察,不是官方說法:2026-08-22 20:30 那一期,到 20:53 API 還查不到。)

  • 獎金還沒公告時不給獎金表。 如果某一期每個獎項都是 0 注、0 元,那是還沒公告,不是沒人中,工具會拿掉獎金表、加上 prizes_pending: true,並說明官方 22:00 公告。21:30 到 22:00 之間官方實際回傳什麼,還沒有在那個時段實測過。

  • 對 API 很客氣:同樣的查詢 5 分鐘內直接用記憶體裡的結果(已結束的月份留 12 小時)、User-Agent 寫明套件名稱、每次請求 15 秒逾時、統計最近 200 期也只發一次請求(用 API 本身的月份區間參數),最多兩次。

  • 38樂合彩、雙贏彩不在官方目前的開獎時程裡(官方的下一期開獎清單沒有這兩個遊戲),API 最後一個有資料的月份是 2023-12。查得到歷史,但不會有新的一期。

對獎規則從哪裡來

獎項名稱與中獎條件照抄台灣彩券官網的遊戲介紹頁(這些頁面由 JavaScript 產生,條文在頁面載入的程式裡):

開獎日來自 https://www.taiwanlottery.com/run_lottery/schedule/ ,20:30 開獎與 21:30、22:00 公布時間來自 https://www.taiwanlottery.com/customer_service/faq/ ,賓果賓果的 07:05 到 23:55 每 5 分鐘來自 https://www.taiwanlottery.com/lotto/result/bingo_bingo/ 。

幾個要知道的地方:

  • 每注獎金一律用該期官方公布的數字,不用規則頁的獎金表。兩者不一定相同,例如 39樂合彩二合,規則頁寫每注 1,125 元,第 115000256 期官方公布的是 1,500 元。

  • 3星彩、4星彩有一種組合不判定。 3星彩「佰位對中、拾位沒中、個位對中」,4星彩「仟位對中、佰位沒中、拾位個位對中」:官網遊戲介紹頁的獎項表裡不符合任何一個獎項,但官網「對獎小幫手」的判斷方式會算中獎。兩個官方來源說法不同,所以工具回傳 won: null 並說明原因。

  • 樂合彩用選幾個號碼決定玩法:選 2 個是二合、3 個是三合,以此類推,要全部對中才算中。系統組合或系統配號的彩券請把每一注分開對。

  • 賓果賓果有基本玩法(1 到 10 星)、超級獎號、猜大小、猜單雙,獎金依玩法、星數、對中個數而定,工具只列出對中的號碼和有沒有對中超級獎號,won 是 null。

每一期都是獨立的

number_stats 只是把過去開出的號碼數一數。每一期開獎都是獨立的隨機事件,過去出現的次數不能預測下一期,出現得多的號碼不會比較容易再開,很久沒開的號碼也不會「該開了」。工具每次回傳統計都會附上這段說明。

聲明

  • 這是開源的資料查詢工具,不是台灣彩券官方產品,和台灣彩券公司沒有關係。

  • 一切以台灣彩券官方公告為準。對獎結果僅供參考,兌獎以彩券本身與官方兌獎結果為準。

  • 只提供官方開獎資訊,不提供任何選號建議。

開發

npm install
npm run build
npm run selftest              # 解析、對獎、統計、連結,用錄下的官方回應,不連網路
node scripts/smoke.mjs        # 用 MCP 用戶端實際連伺服器、實際跑指令列(API 換成錄下的回應)
node scripts/check-publish-ready.mjs
node scripts/live-check.mjs   # 真的呼叫官方 API,每個遊戲一次(不在 CI 裡跑)
node scripts/record-fixtures.mjs  # API 格式改了才需要重錄 fixtures/

English

mcp-server-taiwan-lottery is an MCP server and CLI for official Taiwan Lottery (台灣彩券) draw results. It reads the official API at api.taiwanlottery.com and nothing else, and never fills in numbers the API does not have.

  • Tools: latest_draw, get_draw, list_draws, check_ticket, number_stats, draw_schedule. All read only.

  • Games: 539, lotto649, superlotto, 3d, 4d, 39m, 49m, bingo, plus 38m and lotto1224 (no longer drawn; history to 2023-12). Chinese names are accepted.

  • Install: npx -y mcp-server-taiwan-lottery as an MCP server (stdio), or npx -y -p mcp-server-taiwan-lottery taiwan-lottery latest 539 on the command line. No API key. Node.js 20 or later is recommended. On Node.js 18 npm prints an EBADENGINE warning because @hono/node-server, pulled in by the MCP SDK, declares Node.js 20; this package only uses stdio and never loads it, so it still runs. With npm's engine-strict set, the install fails on Node.js 18.

  • The official data lags: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time. Before 21:30 the day's draw is normally missing; before 22:00 the prize table may be missing, and then the result has no prize table and prizes_pending: true (it does not mean nobody won).

  • check_ticket names the prize tier using the official game rules (pages linked above) and shows the per-ticket amount published for that draw. For BINGO BINGO it returns matches only.

  • number_stats counts past draws only. Each draw is independent; past frequency does not predict future draws.

  • Official announcements prevail. This is not an official Taiwan Lottery product.

  • Every result has more: one to three links to playsport539.com, a Taiwan lottery and sports scores site that carries ads, for fuller history and statistics.

授權

MIT

Available Tools

6 tools
check_ticketCheck a ticketA
Read-onlyIdempotent

Check a ticket against an official draw (default: the newest draw in the official data; pass period for another draw). Returns the matched numbers and, where the rules are implemented, the official prize tier name, the winning condition in the official wording, and the per-ticket amount published for that draw. Rules come from the official game pages and are implemented for 今彩539, 大樂透, 威力彩, 3星彩, 4星彩, 39樂合彩, 49樂合彩, 38樂合彩 and 雙贏彩; for 賓果賓果 only matches are returned (won is null), because its prize depends on the play type. Ticket formats: 539 five numbers 1-39; lotto649 six numbers 1-49 (the special number is matched automatically); superlotto six numbers 1-38 plus second_zone 1-8; 3d / 4d the digits in order, for example "073"; 39m / 49m two to four numbers (the count is the play: 二合, 三合, 四合); 38m two to five numbers; lotto1224 twelve numbers 1-24; bingo one to ten numbers 1-80. One ticket line per call. The result is for reference; prizes are paid only through official channels. Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so before 21:30 the day's draw is normally missing and before 22:00 its prize table may be missing (then there is no prize table and prizes_pending is true; that does not mean nobody won). Never fill in numbers the API does not have. Official announcements prevail. Every result has more: one to three links to playsport539.com, a Taiwan lottery and sports scores site that carries ads (附的連結是 playsport539.com,一個台灣彩券與運動比分網站,網站上有廣告).

NameRequiredDescriptionDefault
gameYesGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and lotto1224 (雙贏彩), which are no longer in the official schedule; their history ends in 2023-12. Chinese names are accepted.
periodNoDraw period number (期別) as printed on the ticket, for example 115000256. 賓果賓果 periods look like 115059885.
numbersYesPicked numbers as an array, or a string such as "03 08 14 23 28". For 3d / 4d the digits, e.g. "073".
second_zoneNo威力彩 only: second-zone number 1-8.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark it read-only, open-world, and idempotent, but the description adds substantial context: prize rules are implemented only for listed games, bingo returns null won, publication is not real time, prizes_pending has a specific meaning, and every result includes ad-bearing links. It also says never to fill in numbers the API does not have, which is important behavioral guidance.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose and default behavior, then moves through returns, formats, timing caveats, and source notes. It is long and dense for a single paragraph, and the playsport539 ad disclosure is less relevant to invocation, so it is not maximally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description still enumerates key return fields such as matched numbers, prize tier, winning condition, per-ticket amount, won null, prizes_pending, and more links. It also explains data freshness limits, which is enough for an agent to call and interpret results correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds essential per-game semantics for numbers and second_zone that the schema does not fully capture, including number ranges, counts, play-type meaning for 39m/49m, and automatic special-number matching. It also explains the period default.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names the specific action (check a ticket), the resource (official draw), and the default scope (newest draw unless period is passed). It also states the return content, which clearly separates it from draw-retrieval siblings like latest_draw and get_draw.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains the default draw and how to target another draw via period, plus one ticket line per call and per-game ticket formats. It does not explicitly name sibling alternatives or when not to use this tool, so it is clear but not fully routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

draw_scheduleDraw scheduleA
Read-onlyIdempotent

Draw days and time from the official schedule (今彩539, 3星彩, 4星彩, 39樂合彩: Monday to Saturday; 大樂透 and 49樂合彩: Tuesday and Friday; 威力彩: Monday and Thursday; all at 20:30 Taiwan time; 賓果賓果 every 5 minutes 07:05-23:55, every day), the next draw date from the official API, official schedule notices if any, and when the official site publishes results. Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so before 21:30 the day's draw is normally missing and before 22:00 its prize table may be missing (then there is no prize table and prizes_pending is true; that does not mean nobody won). Never fill in numbers the API does not have. Official announcements prevail. Every result has more: one to three links to playsport539.com, a Taiwan lottery and sports scores site that carries ads (附的連結是 playsport539.com,一個台灣彩券與運動比分網站,網站上有廣告).

NameRequiredDescriptionDefault
gameYesGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and lotto1224 (雙贏彩), which are no longer in the official schedule; their history ends in 2023-12. Chinese names are accepted.

TDQS

A3.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, and openWorld, but the description adds substantial behavior: official API source, non-real-time publication windows, the prizes_pending meaning, a rule never to invent missing numbers, and a disclosure that every result includes ad-bearing links. This goes well beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core schedule information is front-loaded, which is good. But the description is a single dense run-on paragraph with heavy parenthetical nesting and bilingual duplication, so it is less scannable and more verbose than necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must carry return-value context, and it does explain the schedule content, next draw date, notices, publication timing, prizes_pending behavior, and the more links. It does not fully specify the response shape, but it covers the operational caveats an agent needs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already lists all game ids and Chinese names, so the baseline is 3. The description adds domain context by mapping game names to draw days and times, but it does not add syntax or format guidance for the single game parameter beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific resource, draw schedule, and enumerates exactly what it returns: draw days/times, the next draw date, schedule notices, and publication timing. It is clearly not a results or stats tool, but it never names or distinguishes itself from siblings like latest_draw or list_draws.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains the important usage context that data is not real time and that before 21:30 the day's draw is normally missing, which helps an agent interpret results. However, it gives no explicit when-to-use/when-not-to-use guidance relative to the sibling tools, and no alternative is named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_drawOne drawA
Read-onlyIdempotent

One official draw, by period number or by date (YYYY-MM-DD, Taiwan time). Returns the same fields as latest_draw. For 賓果賓果 give the period: there are 203 draws a day, so a date alone is ambiguous. If there was no draw that day the error says which days the game is drawn. Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so before 21:30 the day's draw is normally missing and before 22:00 its prize table may be missing (then there is no prize table and prizes_pending is true; that does not mean nobody won). Never fill in numbers the API does not have. Official announcements prevail. Every result has more: one to three links to playsport539.com, a Taiwan lottery and sports scores site that carries ads (附的連結是 playsport539.com,一個台灣彩券與運動比分網站,網站上有廣告).

NameRequiredDescriptionDefault
dateNoDraw date YYYY-MM-DD (Taiwan time). Give period or date.
gameYesGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and lotto1224 (雙贏彩), which are no longer in the official schedule; their history ends in 2023-12. Chinese names are accepted.
periodNoDraw period number (期別) as printed on the ticket, for example 115000256. 賓果賓果 periods look like 115059885.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark it read-only, idempotent, and open-world, but the description adds substantial behavioral context: official API source, publication times, the possibility of a missing prize table, the meaning of prizes_pending, and the warning never to fill in unavailable numbers. This is exactly the kind of context annotations cannot provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core lookup behavior and then adds important caveats in a logical order. It is long, but most sentences carry operational value; the parenthetical Chinese ad disclosure and final link note are useful but make the text slightly dense.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description still explains that results match latest_draw's fields and includes a `more` link field. It covers timing, missing data, pending prizes, error behavior, and official-source caveats, which is sufficient for an agent to invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema coverage is 100%, the description adds meaning beyond the schema: dates are Taiwan time, period is required for bingo due to multiple daily draws, and a date alone can be ambiguous. It also explains that missing draws produce an error listing the game's draw days.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: retrieving one official draw by period number or date. It distinguishes its lookup modes and explicitly references latest_draw as the source of comparable fields, so an agent can identify it without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear selection guidance for date versus period, including the important rule that bingo requires a period because 203 draws occur per day. It also explains the no-draw error behavior. It does not explicitly contrast itself with latest_draw or list_draws, which keeps it from a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

latest_drawLatest drawA
Read-onlyIdempotent

Latest official draw of a Taiwan Lottery (台灣彩券) game: period, date, winning numbers in ascending and in draw order, the special number (大樂透 特別號) or second-zone number (威力彩 第二區) where the game has one, the digits for 3星彩/4星彩, the super number for 賓果賓果, and the prize table published for that draw (tier, winners, NTD per winning ticket). Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so before 21:30 the day's draw is normally missing and before 22:00 its prize table may be missing (then there is no prize table and prizes_pending is true; that does not mean nobody won). Never fill in numbers the API does not have. Official announcements prevail. Every result has more: one to three links to playsport539.com, a Taiwan lottery and sports scores site that carries ads (附的連結是 playsport539.com,一個台灣彩券與運動比分網站,網站上有廣告).

NameRequiredDescriptionDefault
gameYesGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and lotto1224 (雙贏彩), which are no longer in the official schedule; their history ends in 2023-12. Chinese names are accepted.

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/openWorld, and the description goes well beyond them: freshness lag, the meaning of prizes_pending ('that does not mean nobody won'), a hard rule never to fabricate missing numbers, precedence of official announcements, and disclosure that the `more` links point to an ad-bearing third-party site. That is unusually rich behavioral context for a read-only tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Payload contents are front-loaded in the first sentence, followed by source, timing caveats, and the ad disclosure in a logical order. It runs long as a single dense paragraph and repeats the advertising disclosure bilingually, which is slightly redundant but defensible for a Chinese-language audience.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description has to describe return values, and it does: field-by-field payload, the `more` links, and the prizes_pending edge case. Combined with the freshness timeline, an agent has everything needed to call it and interpret the result correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the game parameter already lists every accepted id, Chinese name, and the retired games with their history end date. The description adds no further meaning about the parameter, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Latest official draw of a Taiwan Lottery game') and enumerates exactly what comes back: period, date, winning numbers in two orders, special/second-zone number, star-lottery digits, super number, and the prize table. The word 'Latest' plus the fixed enumerated payload separates it cleanly from get_draw (which an agent would expect to take a period argument) and list_draws.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit operational context: the official site publishes numbers at 21:30 and prizes at 22:00 Taiwan time, so before 21:30 the draw is normally missing and before 22:00 the prize table may be missing. It does not explicitly say 'use get_draw instead when you need a historical period', but the time-window guidance is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_drawsList drawsA
Read-onlyIdempotent

Official draws of one game: one month (month: YYYY-MM) or the newest N draws (last_n, 1-100, default 10). For 賓果賓果 use date (YYYY-MM-DD) or last_n. Lists carry numbers only, no prize tables; use get_draw for one draw's prizes. Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so before 21:30 the day's draw is normally missing and before 22:00 its prize table may be missing (then there is no prize table and prizes_pending is true; that does not mean nobody won). Never fill in numbers the API does not have. Official announcements prevail. Every result has more: one to three links to playsport539.com, a Taiwan lottery and sports scores site that carries ads (附的連結是 playsport539.com,一個台灣彩券與運動比分網站,網站上有廣告).

NameRequiredDescriptionDefault
dateNo賓果賓果 only: one day YYYY-MM-DD.
gameYesGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and lotto1224 (雙贏彩), which are no longer in the official schedule; their history ends in 2023-12. Chinese names are accepted.
monthNoMonth YYYY-MM. Give at most one of month, last_n, date.
last_nNoNewest N draws, 1-100. Default 10.

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/idempotent annotations: states the upstream source, the 21:30/22:00 Taiwan-time publication windows, that prizes_pending=true means no prize table rather than no winner, an explicit 'never fabricate missing numbers' rule, and that every result contains ad-bearing links. This is exactly the operational context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The high-value operational facts are front-loaded, but the ad disclosure is duplicated in English and again in a Chinese parenthetical, and the API-scheduling explanation runs on for two sentences. It is informative but noticeably over-written for the payload it delivers.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly compensates by documenting the `more` field, the prizes_pending flag, and the timing conditions under which results will be incomplete. An agent has everything needed to call it and to interpret sparse or pending results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so game ids, month format, last_n range/default and the bingo-only date are already documented. The description restates the same formats and the at-most-one-of constraint rather than adding new syntax or edge-case meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Official draws of one game') and immediately bounds the scope to a month or the newest N draws. It also names get_draw as the tool for a single draw's prizes, so an agent can separate list-level from draw-level retrieval without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit conditional routing: game-specific mode selection ('For 賓果賓果 use date or last_n'), and redirects to get_draw when prize tables are needed. It does not address the sibling latest_draw or draw_schedule, so an agent must infer whether last_n=1 should instead be a latest_draw call.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

number_statsNumber frequencyA
Read-onlyIdempotent

Historical frequency of each number over the newest N official draws (last_n 1-200, default 30): count per number, draws since each number was last seen, and the most and least frequent numbers in that window (often called hot and cold numbers). These are counts of past draws only. Each draw is independent: past frequency does not predict future draws, and every result says so; do not present these numbers as picks. 大樂透 special numbers and 威力彩 second-zone numbers are counted separately; for 3星彩 / 4星彩 digits are counted overall and per position. Data comes from the official Taiwan Lottery API (api.taiwanlottery.com). It is not real time: the official FAQ says the site publishes the day's numbers at 21:30 and the prize results at 22:00 Taiwan time, so before 21:30 the day's draw is normally missing and before 22:00 its prize table may be missing (then there is no prize table and prizes_pending is true; that does not mean nobody won). Never fill in numbers the API does not have. Official announcements prevail. Every result has more: one to three links to playsport539.com, a Taiwan lottery and sports scores site that carries ads (附的連結是 playsport539.com,一個台灣彩券與運動比分網站,網站上有廣告).

NameRequiredDescriptionDefault
gameYesGame id or name. Ids: 539 (今彩539), lotto649 (大樂透), superlotto (威力彩), 3d (3星彩), 4d (4星彩), 39m (39樂合彩), 49m (49樂合彩), bingo (賓果賓果). Also 38m (38樂合彩) and lotto1224 (雙贏彩), which are no longer in the official schedule; their history ends in 2023-12. Chinese names are accepted.
last_nNoNewest N draws to count, 1-200. Default 30.

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only cover read-only/idempotent/open-world, but the description adds substantial operational context: data provenance (api.taiwanlottery.com), a non-real-time window (21:30 numbers, 22:00 prizes), the warning that a missing prize table means prizes_pending=true rather than no winner, and the ad-bearing `more` links. These are exactly the caveats an agent needs beyond the structured hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the independence disclaimer is well placed, but the text carries redundancy (the ads disclosure is repeated in English and Chinese) and includes prize-table/prizes_pending detail that reads as off-topic for a frequency-count tool with no output schema. Roughly a third of the text could be trimmed without losing agent-relevant meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read-only statistics tool with no output schema, the description covers what is returned (counts, gaps, hot/cold), per-game counting rules, data source, and freshness limits. The only oddity is the prize-table discussion, which does not belong to this tool's output and may briefly mislead about what fields to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining how counting differs per game — 大樂透 special numbers and 威力彩 second-zone numbers counted separately, 3星彩/4星彩 digits counted overall and per position. It restates last_n 1-200/default 30, which is redundant with the schema but harmless.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise verb+resource statement ('Historical frequency of each number over the newest N official draws') and enumerates the exact outputs: count per number, draws since last seen, and most/least frequent. This is clearly distinguishable from siblings like latest_draw or get_draw, which return individual draws rather than aggregate frequency statistics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage context ('last_n 1-200, default 30') and a strong constraint on how to present results ('do not present these numbers as picks'), which is genuine guidance rather than mere description. It stops short of naming an alternative sibling or stating when to prefer get_draw/list_draws instead, so it is not a full when/when-not/alternatives treatment.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.1
    • First observedcheck_ticket
    • First observeddraw_schedule
    • First observedget_draw
    • First observedlatest_draw
    • First observedlist_draws
    • First observednumber_stats

TDQS

A4.2/5.0

Scored across 6 tools

Disambiguation4/5

latest_draw, get_draw, and list_draws all return draw data and could be momentarily confused, but descriptions make the boundaries clear (newest single, specific single by period/date, and multi-draw listing without prize tables). check_ticket, number_stats, and draw_schedule are clearly distinct.

Naming Consistency4/5

Most tools follow a verb_noun pattern (get_draw, list_draws, check_ticket), with a few noun-phrase outliers (latest_draw, number_stats, draw_schedule). All are snake_case and readable, so the deviation is minor.

Tool Count5/5

Six tools is well-scoped for a lottery data server: each covers a distinct need (latest, single, list, ticket check, stats, schedule) with no filler.

Completeness4/5

Core lifecycle is covered: latest/current draws, historical listing, single-draw prize tables, ticket validation across games, frequency stats, and schedule. A minor gap is the lack of a tool to enumerate supported games or fetch game rules directly.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    Provides comprehensive Taiwan stock market data and analysis through MCP tools. Enables querying real-time stock prices, historical data, company information, technical analysis, and market overviews for TWSE and TPEx listed companies.
    8
    16
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides read-only access to Taiwan's Central Weather Administration (CWA) Open Data API, offering 36 tools across 7 categories including weather forecasts, observations, earthquakes, and astronomy.
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables retrieval of Taiwan lottery data for a specified month, supporting Super Lotto 638, Lotto 649, Daily Cash 539, and Lotto 4D.
    4
    MIT