Main Page
Public AI is a structured knowledge base of tools and resources that AI assistants can access programmatically to help users with real-world tasks.
What is Public AI?[edit | edit source]
Public AI serves as a bridge between AI assistants (like Claude, ChatGPT, etc.) and real-world information that users need. Instead of AI assistants having outdated or incomplete information, they can query this wiki to get current, accurate, and localized data.
How It Works[edit | edit source]
- Structured Data: Information is stored using MediaWiki's Cargo extension, making it queryable like a database
- MCP Server: A FastMCP server reads from this wiki and exposes the data as tools that AI assistants can use
- AI Integration: When you ask an AI assistant a question (e.g., "What's the suicide hotline in Singapore?"), it queries this wiki and gives you current information
Use Cases[edit | edit source]
- Crisis Support: Get current hotline numbers and resources for mental health emergencies
- Transit Information: Real-time public transportation schedules and routes
- Events & Activities: Discover upcoming community events and festivals
- Location Services: Search for places and get geographic information
- And more...: Any information that benefits from being current, localized, and structured
Understanding Public AI Tools[edit | edit source]
Public AI has two types of tools, each serving different purposes:
| Wiki Tools | MCP Tools |
|---|---|
| Data lives in this wiki The MCP server reads and serves wiki content to AI assistants |
Code lives in GitHub repository Python functions that integrate with external APIs |
Examples:
|
Examples:
|
| Who can contribute: Anyone (no coding required) | Who can contribute: Developers (Python required) |
Best for:
|
Best for:
|
Browse All Tools[edit | edit source]
| Tool | description | community | has resources |
|---|---|---|---|
| Main Page | No | ||
| Tool:SuicideHotline | International suicide prevention hotlines and crisis support resources | Singapore • Switzerland | Yes |
| Tool:UpcomingBTO | Upcoming Build-To-Order (BTO) public housing launches in Singapore | Singapore | Yes |
| Tool:UpcomingEvents | Community and public events happening in various locations | Singapore | Yes |
How to Contribute[edit | edit source]
Choose your contribution pathway based on what you want to do:
1️⃣ Add Data to an Existing Tool[edit | edit source]
Add or update localized data for an existing tool
Difficulty: Easy (no coding required)
Perfect for:
- Adding suicide hotline numbers for your country
- Contributing upcoming events in your region
- Adding local crisis resources
- Verifying and updating existing information
Quick start:
- Browse the tools above and find one with
has_resources=true - Check the tool's page for its custom resource template (e.g., Template:SuicideHotlineResource, Template:UpcomingEventsResource)
- Create or edit a page:
Resource:ToolName/YourLocation - Use the tool's specific resource template with the appropriate fields
- Fill in your local data and save!
💡 Tip: Look at existing resources for that tool to see what fields are available and how to format your data.
2️⃣ Create a New Wiki Tool[edit | edit source]
Design a new tool with a custom data structure
Difficulty: Medium
When to use this:
- You have location-specific data that communities can maintain
- The information doesn't require API calls
- You need a specific data structure for your use case
Quick start:
- Create
Template:YourToolNameResource- define your data fields (see Template:SuicideHotlineResource or Template:UpcomingBTOResource as examples) - Create
Tool:YourToolName- use the Template:Tl template withhas_resources=true - Create
Resource:YourToolName/Location- add your first resource using your template - Go to Special:CargoTables, find your table, and click "Recreate data"
💡 Important: ALL resource templates must include these baseline fields: tool, country, region, last_verified. Your table name must be YourToolNameResources for the MCP server to work.
3️⃣ Add a New MCP Tool[edit | edit source]
Implement a Python tool that integrates with external APIs
Difficulty: Advanced (requires Python/coding)
When to use this:
- You need to call external APIs (weather, transit, etc.)
- The tool requires real-time data
- Complex logic or data transformation is needed
Quick start:
- Fork the repository
- Add your
@mcp.tool()function tomain.py - Test locally with
python main.py - Submit a Pull Request
Example tools to create:
- Weather API integrations
- Stock market data
- Real-time transit for other countries
- News aggregators
Quick Decision Guide[edit | edit source]
| I want to... | Use this pathway |
|---|---|
| Add data to an existing tool | 1️⃣ Add Data to an Existing Tool |
| Create a tool with custom data fields | 2️⃣ Create a New Wiki Tool |
| Build an API integration or complex tool | 3️⃣ Add a New MCP Tool |
Examples to Learn From[edit | edit source]
Well-designed Tools:
- Tool:SuicideHotline + Template:SuicideHotlineResource - Crisis resources with multiple contact methods
- Tool:UpcomingEvents + Template:UpcomingEventsResource - Events with dates and venue information
- Tool:UpcomingBTO + Template:UpcomingBTOResource - Single-country tool (region field left empty)
How Resource Templates Work[edit | edit source]
Each tool defines its own resource template with exactly the fields it needs:
| Tool | Template | Custom Fields | Notes |
|---|---|---|---|
| Tool:SuicideHotline | Template:SuicideHotlineResource | primary_phone, secondary_phone, text_service, online_chat_url, youth_hotline, emergency_services, languages, availability | Multi-country, uses region for states/provinces |
| Tool:UpcomingEvents | Template:UpcomingEventsResource | event_name, event_type, start_date, end_date, venue, address, admission, description, registration_url | Multi-country, region optional |
| Tool:UpcomingBTO | Template:UpcomingBTOResource | launch_month, location, unit_count, flat_types, classification | Single-country (Singapore only), region left empty |
| Your tool! | Template:YourToolResource | Whatever fields you need! | Remember: tool, country, region, last_verified are always required |
This gives tool creators complete flexibility to structure their data appropriately.
Guidelines[edit | edit source]
Quality Standards[edit | edit source]
- Accuracy: All information must be current and verified
- Verification: Always include a
last_verifieddate - Completeness: Fill in all relevant fields for your resource
- Localization: Information should be specific to the country/region
- Neutrality: Present information objectively without bias
What Belongs Here[edit | edit source]
✅ Good candidates for Wiki Tools:
- Information that changes over time (phone numbers, schedules, events)
- Localized data (country/region-specific resources)
- Public services (hotlines, transit, emergency services, events)
- Data that AI assistants frequently need but may not have current info on
- Information that benefits from community verification
❌ Not appropriate:
- Personal or private information
- Copyrighted content without permission
- Information that rarely changes and is well-known (e.g., historical facts)
- Opinion pieces or subjective content
- Time-sensitive data that changes by the minute (use MCP tools with APIs instead)