Skip to content

AI Tools

ChatPage has access to a wide range of tools that you can use to steer the AI for better results. These tools enable the AI to perform specific actions, fetch data, manage files, and integrate with various services automatically.

When you give ChatPage a prompt, it can use these tools to accomplish your request. While you don’t need to explicitly call these tools yourself, understanding what’s available helps you write better prompts and know what the AI is capable of doing.

Tools for working with project files:

  • fetch_files: Retrieve and read project files
  • fetch_assets: Access project assets and resources
  • edit_file: Apply targeted edits to existing files using Relace instant apply, enabling near-instantaneous code modifications even on large files
  • write_file: Create or modify files in your project
  • delete_file: Remove files from your project
  • add_env_vars: Add environment variables to your project configuration

Example prompts:

  • “Add a new component file for the user profile”
  • “Delete the old landing page file”
  • “Add an environment variable for the API endpoint”

Tools for accessing external web content:

  • web_search: Search the web for information, documentation, or resources
  • scrape_website: Extract content from specific websites

Example prompts:

  • “Search for the latest React documentation”
  • “Find examples of modern hero section designs”
  • “Get the content from the company’s about page at example.com”

Tools for working with Supabase databases:

  • supabase_execute: Execute SQL queries on your Supabase database
  • supabase_query: Query tables and retrieve data from Supabase

Example prompts:

  • “Query all users from my Supabase database”
  • “Create a new table in Supabase for storing blog posts”
  • “Insert sample data into the Supabase products table”
  • “Update user profiles where the account is inactive”

Tools for working with images:

  • generate_images: Create AI-generated images from text descriptions

Example prompts:

  • “Generate an image of a modern office workspace for the about page”
  • “Create a hero image showing a tropical beach at sunset”

You don’t need to call tools explicitly. Just describe what you want in natural language:

  • Instead of: “Use db_query to select from users”
  • Say: “Show me all users in the database”

The AI will automatically select the appropriate tool.

The AI can use multiple tools to complete complex tasks:

"Query all products from Supabase and display them
in a grid on the shop page"

The AI will:

  1. Use supabase_query to get products
  2. Use write_file to update the shop page

Knowing available tools helps you write better prompts:

  • Good: “Search the web for modern pricing page examples and implement one”

    • AI knows it can use web_search to find examples
  • Good: “Query all orders from Supabase and calculate total revenue”

    • AI knows it can use supabase_query to fetch the data

Be aware of what tools can and cannot do:

  • Tools work within their specific domains
  • Some tools require proper configuration (API keys, integrations)
  • Tools follow service-specific limitations (rate limits, permissions)
"Fetch user profiles from Supabase and create a team members
page showing their names and roles"

Tools used: supabase_query, write_file

"Generate a hero image showing a modern workspace, then use it as the
background for the homepage hero section"

Tools used: generate_images, write_file

"Search for the latest best practices for form validation, then implement
a contact form following those practices"

Tools used: web_search, write_file

When working with databases, be clear about the source:

  • “Query from Supabase” for Supabase database operations

Include information the tool will need:

  • Table names for database operations
  • Specific URLs for web scraping

The AI will choose the right tools automatically. Focus on describing your goal, not which tools to use.

Take advantage of the AI’s ability to chain tools together. Describe multi-step workflows naturally:

"Query users from Supabase and display them in a table
with sorting and filtering"
  • Project Files: fetch_files, fetch_assets, edit_file, write_file, delete_file, add_env_vars
  • Web: web_search, scrape_website
  • Supabase: supabase_execute, supabase_query
  • Images: generate_images

Understanding the tools available to ChatPage helps you craft more effective prompts and accomplish complex tasks with simple natural language requests. The AI handles tool selection and execution automatically, allowing you to focus on describing what you want to achieve.