AI chat tools
The ✦ AI → Chat in the builder is an agent that works on your project with tools: it reads files, edits them, checks the build, looks at pages in a browser, changes the data API, imports data and more. This page lists every tool it has, what it may do on its own, and what always waits for you.
Every one of these tools is also available to your own agents through the MCP server, under the same name. The MCP tool reference has their arguments and examples.
How an answer runs #
You send a message; the chat answers as a job on the server. Closing the page doesn't stop it: the chat reattaches when you come back, and you get a notification when it ends.
- The AI starts with a short map of the project (pages, components, data models, sign-in, design direction) and what it remembers about the project. It fetches details only when it needs them, with
get_context,read_fileandinspect_data. - It calls tools, a round at a time. Between calls it writes short notes, so the thread reads like a conversation.
- When it changed files, the server checks its work automatically (see Automatic checks) and gives it one round to fix what broke.
- The answer ends with what it did and what's left.
Each answer is billed to the person who sent the message, in AI credits on the site's keys, or on your own key at no charge from Devmachinist.
Two modes #
| Mode | What the AI may do |
|---|---|
| Ask | Read, check and explain. It can't change files, data or settings. Besides the reading and checking tools, a few that only record something or ask you stay on: remember, ask_question, connect_database, connect_app, and collecting web sources (collect_source, refresh_source). |
| Edit | Everything in the tables below, within the limits on this page. |
The Ask mode column in the tables says whether a tool is available in Ask mode.
The tools #
Reading the project #
| Tool | Ask mode | What it does |
|---|---|---|
list_files | yes | List the project's source files (src/ and index.html) with their sizes. |
search | yes | Search the project's files for text (or a regular expression). |
read_file | yes | Read a file with line numbers. |
get_context | yes | Fetch project knowledge on demand instead of guessing: "components" (props and exact import lines; pass names to get only those), "design" (the design system classes), "data" (data hooks, endpoints and rules of the connected APIs), "auth" (sign-in components and roles), "files" (the app’s file storage: who can upload, what’s stored, how pages upload and show public and private files), "structure" (page links and file rules), "modules" (helpers and installed packages), "graphics" (how to build 3D / WebGL / canvas scenes here with React Three Fiber — read it before any 3D work), "game" (how the multiplayer game server works: Colyseus 0.18 rooms, state, the client and sign-in), "tools" (every tool’s limits, transaction and retry guarantees). |
game_status | yes | The project's multiplayer game servers (rooms in server/, Colyseus): whether the dev (preview) and live (published) servers run, how many players are connected, and their recent output — errors from the rooms and console.log lines. |
game_test | yes | Test the multiplayer game server with real players: 2–8 test players (signed in with test identities, or guests) join rooms, send messages, wait for or rule out messages and check room state on the dev or live server. Returns every step, the rooms' state and the server's output. |
get_api | yes | Show the project's data API (the one the API designer edits): models with every field (type, required, unique, enum values, references), access rules and whether sign-in is on. |
get_theme | yes | Show the site's brand and theme: the three brand colors (brand-, secondary-, accent-*), extra named colors, heading and standard fonts, text styles per element (h1–h6, p, span, a, li, button, label, blockquote, code), light/dark appearance, corner radius, spacing density, shadows and text size — and every allowed value. |
git_status | yes | The project's git state: branch and upstream (ahead/behind), remotes, local branches, staged/changed/new files and recent commits; diff: true adds the diff (one file with file). |
Changing code #
| Tool | Ask mode | What it does |
|---|---|---|
edit_file | no | Make ALL the changes one file needs in a single call: plan them first, then list every edit here. |
replace_text | no | Replace one exact snippet in a file with new text. |
replace_lines | no | Replace lines from..to (1-based, inclusive) of a file with new text. |
insert_lines | no | Insert text after line after (0 = at the very top) of a file. |
create_file | no | Create a NEW file: a component in src/components/<Name>.jsx, a page in src/pages/<Name>.jsx, a module in src/lib/utils/hooks, a 3D scene in src/scenes, a shader in src/shaders (a .js module exporting the GLSL string), a stylesheet in src/styles (.css) or data in src/data (.json). |
delete_file | no | Delete a file the project no longer uses (a component, or a file in src/lib/utils/hooks/scenes/shaders/styles/data). |
rename_file | no | Move or rename a module in src/lib/utils/hooks/scenes/shaders/styles/data (not components or pages). |
install_package | no | Install npm packages the change really needs (e.g. |
remove_package | no | Uninstall npm packages the project no longer imports. |
set_theme | no | Change the brand and theme (More → Brand) instead of hard-coding styles: colors are Tailwind families (primary = brand-, secondary-, accent-*), fonts by name (heading_font for h1–h6 and font-heading, standard_font = body_font for font-sans, the font for the whole site), mode system/light/dark (light/dark fix the appearance: dark: variants always or never apply), text {element: {font standard/heading/<font name>, weight light/normal/medium/semibold/bold/extrabold, size xs…7xl, tracking tighter…widest, leading tight/snug/normal/relaxed/loose, case upper/lower/capitalize/none, style italic/normal}} per element h1 h2 h3 h4 (h4–h6) p span a li button label (labels and fields) blockquote code — a value or element set to null clears it, radius none/sm/md/lg/xl, density compact/cozy/roomy, shadow none/soft/bold, size small/normal/large, add_colors [{name, family}] for new palettes such as success → emerald (then bg-success-500 works), remove_colors [name]. |
delete_page | no | Delete a page for good: its file, its route and its menu entry; it leaves the live site at the next publish. Undo brings it back. |
set_page_access | no | List or delist a page in the site menu (site.js) and set who may open it: roles [] = everyone, ["user"] = any signed-in account, ["admin"] = admins, or a custom role. |
git | no | Run one git operation in the project: init (with a first commit), commit {message, files?} (adds files or everything, then commits — write a clear imperative subject, a blank line and why if useful), push {remote?, branch?, remote_branch?, set_upstream?}, pull {remote?, branch?, rebase?} (fast-forward only unless rebase), fetch {remote?}, branch {name, checkout?} (creates and switches by default), checkout {name}, remote_add / remote_set_url {remote, url}, remote_remove {remote}. |
Checking the work #
| Tool | Ask mode | What it does |
|---|---|---|
build_check | yes | Build the site now, both ways it is built: the preview (Vite, development mode) and the published site (Next.js static export, what Publish makes). |
inspect_page | yes | Open one page in a headless browser and report what happens: every console message, uncaught errors, failed requests, the headings, buttons, links, fields and text it shows, and a screenshot both the AI and the person see. as (user, admin or a custom role) signs in a test account on throwaway copies of the data first; full_page captures the whole page. |
site_analytics | yes | Visits to the published site: views, visitors, bounce rate, the change against the period before, busiest days, top pages, sources, devices and countries. |
simulate_journeys | yes | Test the site as real people would use it, on throwaway copies of the data: a visitor, a signed-in user, an admin and each custom role open every page (errors, accessibility), fill and submit forms, and each model's read/add/change/delete is probed for every role against its rules. |
check_access | yes | Check the data API's access rules for problems: anyone able to change or delete rows, personal data readable by the public, rules that need sign-in while it's off. |
Data #
| Tool | Ask mode | What it does |
|---|---|---|
change_api | no | Change the project's data API through the API designer (never edit the files in src/api/ — those files are regenerated from it). |
inspect_data | yes | Look at the project's data before proposing changes: every model (or one) with its fields, required/unique/enum/reference rules, who may read/add/change it, how many rows it has, a few recent rows, which models point at it, and where its imported rows came from. |
query_data | yes | Look at exactly the rows you need, read-only: where [{field, op, value}] (op eq, ne, lt, lte, gt, gte, contains, starts, in (value = list), null, notnull, orphan = a reference pointing at no row), sort + order, limit (≤ 250) + offset, fields to show; or group_by a field (counts per value), or duplicates_on fields (groups of rows with the same trimmed, any-case values). |
stage_data | no | Propose adding or updating many rows of ANY model at once — nothing is saved yet. |
import_status | yes | Status of staged imports: no staged_id = the recent ones (pending, committed, undone…, with counts); staged_id = that one in detail — its plan, result, verification, and every row that wasn't saved with the reason (paged with offset/limit ≤ 250; row numbers are the source's, 1-based). |
retry_failed | no | Stage again only the rows of a saved import that weren't saved, with optional fixes_json {"<row number>": {"field": value}} for what was wrong. |
verify_import | yes | Re-check a committed import (staged id): read its rows back now and report how many still match, changed or are missing. |
app_files | yes | List the files stored in the app's file storage (the data API's /files: product photos, covers, members-only PDFs, customers' uploads): url, access (public / private / users / a role), type, size, original name, who uploaded it, plus who may upload and the account's space. |
store_app_file | no | Put a file from the project (a Chat attachment in public/media/ or uploads/, or any workspace file) into the app's file storage and get its url — to use in data rows (stage_data, sample_rows) or code. |
The web and sources #
| Tool | Ask mode | What it does |
|---|---|---|
read_url | yes | Read a web page the person mentions (or one linked from it): its text, headings, links, images and a design summary from its stylesheets (colors, fonts, CSS variables, sizes, radii, shadows). |
import_url | no | Copy a file from the web into the project WITHOUT reading or retyping it: a stylesheet, script, JSON, SVG, image or 3D file (.glb .gltf .hdr .exr .ktx2 .bin ≤ 25 MB → public/models/) saved whole, or with selectors just the matching CSS rules (plus the CSS variables and keyframes they use) from a stylesheet or from a page's styles. |
collect_source | yes | Collect web pages into a stored source the app keeps (you get an id, the fields and a few samples — not the content): one page, or with follow_links the same-site pages it links to (e.g. |
find_sources | yes | List this project's collected sources, or search inside them (query) — articles and pages collected earlier, in any chat. |
refresh_source | yes | Collect a source again and compare it with what was imported: changed, new and removed pages; the records from changed pages and the pages/components showing them are flagged as out of date. |
trace_evidence | yes | The evidence graph: where things came from and where they show. |
Experiments #
| Tool | Ask mode | What it does |
|---|---|---|
start_experiment | no | Start an experiment branch before a risky or exploratory change (a redesign, new data models, a big import, "try X"): the files are snapshotted and the data APIs copied, so every edit, change_api and stage_data after this works on the branch and the live site and its data stay untouched. |
experiment_status | yes | What the running experiment changed so far (files, API definitions, approved imports). |
Memory and questions #
| Tool | Ask mode | What it does |
|---|---|---|
remember | yes | Save something about this project for future conversations: a decision, a fact about the business, or a preference. |
ask_question | yes | Queue a question you need the person to answer instead of inventing a requirement. |
Instructions it follows #
Under More → AI → Instructions for the AI you can write instructions that the chat follows in every answer:
- This project: shared with everyone working on the project.
- All your projects: yours only, used in every project you open.
Write lasting rules, such as the voice, design choices, data conventions or what not to touch. Agents connected over MCP read the same instructions with project_map and get_knowledge, and can change them with set_knowledge.
Working alongside others #
| Tool | Ask mode | What it does |
|---|---|---|
declare_plan | no | Before changing more than one file (or any data API), say what you will do and which files and APIs you will change. |
ai_activity | yes | What else is happening in this project right now: other people's AI answers and builds (their goal, plan and the files and APIs they hold) and who has which file open. |
Databases and apps #
| Tool | Ask mode | What it does |
|---|---|---|
list_connectors | yes | List what this project can connect to (PostgreSQL and MySQL databases, and apps such as Google Sheets, Airtable, Notion), what each supports (read / import / write), whether it is set up on this site, and the connections the project already has. |
connect_database | yes | Ask the person to connect an external database. |
connect_app | yes | Ask the person to link an app by signing in to it (a button in the chat). |
inspect_connection | yes | What an app connection can reach (its sheets, tables or databases), or with resource one resource's fields and first rows. |
inspect_database | yes | Look at a connected database: engine and version, what this user may do, every table with its size; with table, that table's columns, types, keys, relationships (both ways), exact row count and first rows. |
query_database | yes | Run ONE read-only query on a connected database (SELECT / WITH / SHOW), inside a read-only transaction with a timeout. |
stage_database_changes | no | Prepare changes to a connected database for the person's approval — nothing is written. |
plan_database_migration | no | Plan moving rows between a connected database and this project's data (or another connected database): source and destination are {connection_id, table} or {model}. |
run_database_migration | no | Continue a transfer the person already approved that failed, was stopped or was interrupted (it resumes from the last saved batch). |
migration_status | yes | Progress and result of a migration: rows read, added, updated, skipped, failed (with reasons), the read-back verification, and whether it can be resumed. |
Limits on one answer #
| Limit | Value |
|---|---|
| Tool rounds | 16; 24 at High reasoning, 32 at Max. The last round has no tools, so the AI always finishes with an answer. |
| Edits to one file | 10 |
Web reads (read_url, collect_source, import_url, refresh_source) | 10, and at most 20 fetches a minute to one site |
inspect_page | 4 calls, each with up to 25 actions |
simulate_journeys | 2 |
| Experiment checks | 1 |
| Git push, pull, fetch and remote changes | 3 |
| Package installs and removals | 4 |
| Database and app calls | 20 |
| One tool result | 100,000 characters; after 800,000 characters of results in one answer, each result is cut to 20,000 |
When a limit is reached the tool says so, and the AI tells you what's left so you can ask again. get_context {topic: "tools"} gives the AI (and your agents) the full list of limits and guarantees.
What always waits for you #
The AI prepares; you decide. These never happen without a person pressing a button:
- Saving imported data.
stage_dataandretry_failedonly build a preview. You press Approve and save on the card in the chat. The save is one transaction, every row is read back to verify it, and Undo is kept for 30 days. - Changes to a connected database.
stage_database_changespreviews inserts, updates, deletes and schema changes; you approve them on the card. A transfer planned withplan_database_migrationstarts only when you press Approve and run. - Credentials.
connect_databaseandconnect_appput a secure form or a sign-in button in the chat. The AI never sees a password, key or connection string; it gets aconn_…id. - Finishing an experiment.
start_experimentworks on copies of your files and data. Only you approve (merge) or discard it. - Remembered facts and questions.
remembersaves a suggestion andask_questionan open question; you confirm or answer them in the chat's memory panel. - Publishing. The chat has no publish tool. It is told to push, pull or change git remotes only when you asked for it in your message, and at most 3 times an answer.
Automatic checks #
After an answer that changed files, the server:
- Checks every changed file for syntax errors.
- Builds the site the way the preview does (Vite) and the way publishing does (Next.js), then opens every page in a headless browser and collects errors.
- Gives the AI one low-cost round to fix what it found, and checks again.
The results appear in the thread. After a data API change, the access rules are checked too (check_access): anyone able to change or delete rows, personal data readable by everyone, rules that need sign-in while it's off.
Undo #
Every answer keeps a copy of what it changed: files (and files it created), deleted pages, the data API's models and rules, page access, the theme, installed packages and stored app files. Undo on the answer puts them back. Data saved through Approve and save has its own undo on its card.
Working alongside others #
Several people, each with their own AI, can work in one project. Before changing more than one file or a data API, the AI calls declare_plan: the files and APIs it names are held for that answer, people see the plan live, and another AI that tries to change them is refused with who holds them and why. ai_activity shows what else is running. While an AI changes a file, people see it update live and can't edit it until the AI is done. See Teams.
Agents using the MCP server take part the same way. Every file an agent writes is held for it as well, like a chat answer's: people watch it change live and can't edit it, and other AIs and agents are refused it, until the agent has made no call for 3 minutes (15 with a declared plan) or calls release_plan. The agent's own writes pass its own holds. A plan made with declare_plan holds its files ahead of time.
Attachments #
Files you attach to a message (the paperclip, drag and drop, or paste) are uploaded into the project: pictures, video, audio, PDFs and fonts to public/media/, anything else to uploads/. The AI is told where each one is: it can use a picture on a page, read a text file, or import a CSV or JSON file with stage_data {file_path}. Files never leave the server.
Choosing the model #
The chip at the top of the chat picks the provider, the model and, for models that reason, the level (Auto, Low, Medium, High, Max). It saves to the project if the project has its own choice, else to your account. Higher levels think longer and get more tool rounds.
From an agent #
Your agents get the same tools over MCP, or over REST with a personal access token:
# The same search the chat runs
curl -X POST https://devmachinist.com/api/projects/<projectId>/tools/search \
-H "Authorization: Bearer dm_pat_…" -H "Content-Type: application/json" \
-d '{"query": "useProducts"}'{ "ok": true, "tool": "search", "result": "src/components/ProductGrid.jsx:3: import { useProducts } from '../api/shop.js'" }Tools that have their own REST route (reading lines, editing files, staging data, checks, git and others) are listed with that route in the MCP tool reference; their argument names can differ slightly from the chat's (for example stagedId instead of staged_id).