Skip to content

Add Numbers.sg tool plugin (numbers-sg/numbers_sg) 0.0.1 - #4114

Open
jeremiahsay wants to merge 1 commit into
langgenius:mainfrom
jeremiahsay:add-numbers-sg
Open

jeremiahsay wants to merge 1 commit into
langgenius:mainfrom
jeremiahsay:add-numbers-sg

Conversation

@jeremiahsay

@jeremiahsay jeremiahsay commented Dec 4, 2026 •

Copy link
Copy Markdown

Plugin Submission

Plugin information

Submission type

  • New plugin
  • Version update

What changed

New tool plugin for Numbers.sg, which publishes Singapore's money numbers read on a schedule from official sources (MAS, LTA, CPF Board, IRAS, SingStat, SP Group). Eight read-only tools, no credentials:

  • Find a dataset, Get a figure, Get dataset rows: SORA, T-bill auctions, Savings Bonds, COE results, CPF rates and retirement sums, income tax rates, ABSD and BSD, inflation, the SP electricity tariff and SGD exchange rates.
  • Calculators: stamp duty (BSD and ABSD), take-home pay, income tax, CPF contributions, Savings Bond returns.

Each tool returns a text message written for a model to quote (the figure, the date of the row, the publisher, when the source was last read and whether that read is late, a page to link and a CC BY 4.0 credit line) and a JSON message with the full answer for workflows. Tool forms are generated from the server's own input schema (scripts/gen_tools.py), and CI fails if they drift. Labels and descriptions are in English with zh_Hans translations.

Risk level

  • Low risk
  • Medium risk
  • High risk

Medium: the calculators send user-provided numbers (for example a monthly salary and age, or a property price) to the Numbers.sg service. Otherwise it only calls one fixed, documented HTTPS API.

Required checks

  • I have read and followed the Marketplace submission requirements.
  • I have read and comply with the Plugin Development Guidelines.
  • I tested this plugin on Dify Community Edition and Dify Cloud, or documented any limitation below.
  • The package contains only files needed at runtime.
  • The package does not contain secrets, local credentials, .env files, .git directories, virtual environments, caches, logs, or IDE files.
  • The package does not contain executables or bundled binaries, or I explained why they are required below.
  • The plugin README includes setup steps, usage instructions, required APIs or credentials, connection requirements, and the source repository link.
  • The plugin includes PRIVACY.md or a hosted privacy policy, and manifest.yaml references it.
  • All user-facing text is primarily in English, with any localized README files following the i18n guidance.

Security and privacy notes

  • Network: one fixed destination, https://numbers.sg/api/mcp (declared under network.domains), with a 30 s timeout and one retry. Not chosen by the model or the user; no arbitrary URL fetching, proxying or crawling.
  • No credentials: nothing to configure, store or leak.
  • Financial data: the plugin reads public figures and does arithmetic. It makes no payments, transfers, trades or account access of any kind.
  • User inputs: the calculators send the numbers they are given (such as salary, age or property price) and nothing else: no conversation text, Dify user or workspace ids, or files. The server keeps standard web access logs (which include these inputs and the caller's IP) for up to 12 months; PRIVACY.md says so, and that nothing is sold or shared.
  • No code execution, SQL, file operations, shell access or browser automation. Dependencies: dify_plugin only; the client uses the Python standard library.

Local validation

python scripts/gen_tools.py --check   -> tools match the live server
pytest -q                             -> 32 passed (dify_plugin 0.11.1, Python 3.12)
python scripts/build.py               -> numbers_sg-0.0.1.difypkg (28 files, 29,379 bytes)
python scripts/selfcheck.py           -> no problems found

The 32 tests load each tool with dify_plugin's load_single_subclass_from_source (as the plugin runtime does), validate every YAML file with ToolConfiguration / ToolProviderConfiguration, and invoke all eight tools against the live server with no key. Checks include IRAS's worked example (BSD on a S$1.5 million first home = S$44,600) and CPF's 20% employee rate (S$6,000 at age 30 = S$4,800 take-home before tax). CI runs the same suite every week on dify_plugin 0.9.x and 0.11.x: https://github.com/numbers-sg/dify-numbers-sg/actions

The package is the release asset of https://github.com/numbers-sg/dify-numbers-sg/releases/tag/v0.0.1 (SHA-256 659908ed6a58b447b5a70adbb34e78a8962072b57f90396410676ecd0bdf6c32), built by scripts/build.py as a plain zip of the runtime files.

Reviewer notes

Testing limitation: I tried Dify Cloud through remote debugging (debug.dify.ai:5003). The plugin started and loaded its tools locally, but the debug server answered handshake failed, invalid key with the key shown in the workspace's Debugging panel (Sandbox plan), so I could not complete an end-to-end run on Cloud. I have not run it on a full Community Edition install. Coverage is the SDK-level tests above against the live service. Happy to rerun anything you'd like checked.

I run Numbers.sg.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant