Tool Reference
Every MCP tool Hyphertext exposes, grouped by area. This mirrors what each tool's own MCP description says — read this as a map of the surface, and rely on the live tool descriptions (visible in your client) for exact argument validation, since those are the source of truth and can be more current than this page.
Orientation
| Tool | Arguments | What it does |
|---|
get_started | none | Platform overview, workflow, and conventions — call this first. |
get_account_status | none | Caller's subscription tier, site limit vs. published count, page limit vs. total pages. |
Pages
| Tool | Arguments | What it does |
|---|
list_pages | limit?, offset? | Lists the caller's pages — id, title, publish state, visibility, source, timestamps. |
get_page | page_id | Full page including html_content and public_app_key (the runtime endpoint key — see Runtime Endpoints). |
create_page | title, html, publish? | Creates a page from HTML you supply. html is required — this tool does not generate HTML. Optionally publishes immediately. |
update_page_html | page_id, html | Full replace of a page's HTML. Snapshots the previous version first (revertable). Prefer str_replace_page_html for small edits. |
str_replace_page_html | page_id, old_str, new_str, replace_all? | Exact-substring find/replace, like an editor's find/replace. old_str must match exactly and be unique unless replace_all is set. |
publish_page | page_id, publish, caption?, show_on_profile?, visibility? | Publishes or unpublishes. visibility: "private" restricts the page to its owner, signed in. |
delete_page | page_id | Permanently deletes a page and its files. Not reversible. |
Multi-file projects
index.html stays the entrypoint, edited via the page tools above. These tools manage sibling files an index.html can reference by a plain relative path (e.g. <script src="app.js">) — served alongside the entrypoint at publish time.
| Tool | Arguments | What it does |
|---|
list_project_files | page_id | Lists auxiliary files (path, content type, size, timestamps). |
get_project_file | page_id, path | Fetches one file's full content. |
create_project_file | page_id, path, content | Creates a new file. Fails if the path already exists. Path can't be index.html, start with /, or contain ... |
update_project_file | page_id, path, content | Full replace of an existing file. Fails if it doesn't exist yet. |
str_replace_project_file | page_id, path, old_str, new_str, replace_all? | Same find/replace semantics as str_replace_page_html, for a non-entrypoint file. |
delete_project_file | page_id, path | Permanently deletes one auxiliary file. Can't delete index.html this way. |
Assets (images, PDFs, docs)
Three upload paths exist because MCP clients vary a lot in what network access their tool-calling code actually has. Pick based on your environment:
| Tool | Arguments | What it does |
|---|
list_assets | page_id | Lists files attached to a page, including extracted text / vision description where available. |
| Default — chunked upload over the MCP channel itself, always works |
start_asset_upload | page_id, file_name, content_type | Step 1/3. Reserves a slot, returns asset_id and the exact chunk size to use. |
upload_asset_chunk | asset_id, chunk_index, chunk_base64 | Step 2/3. Send once per chunk, in order, starting at 0. |
finish_asset_upload | asset_id | Step 3/3. Assembles the chunks, uploads to storage, returns the finished asset (with public_url for images). |
| Alternative — only if your environment has open outbound HTTPS to arbitrary hosts |
create_asset_upload_url | page_id, file_name, content_type | Returns a one-time signed URL to PUT raw bytes directly to storage (no base64, no MCP channel). |
confirm_asset_upload | asset_id | Verifies the PUT landed and finalizes the asset row. |
| Small files only, single call |
upload_asset | page_id, file_name, content_type, content_base64 | Inline base64 upload in one call. Only for small files (~225KB raw or less) — use the chunked flow above it. |
delete_asset | page_id, asset_id | Removes a previously uploaded file. |
Project database
A generic per-project JSONB document store — records isolated by page_id plus a collection name you choose (e.g. "todos", "messages"). Collections are created implicitly on first insert, capped at 5,000 rows each. These tools are for build-time seeding/inspection under your own session; the published page's own JS reads and writes the same data at runtime through a separate endpoint — see Runtime Endpoints.
| Tool | Arguments | What it does |
|---|
db_insert | page_id, collection, data | Inserts one JSON document. |
db_query | page_id, collection, filter?, limit?, offset? | Lists records, newest first. filter matches records containing all given key/value pairs. |
db_update | page_id, record_id, data | Replaces one record's data field by id. |
db_delete | page_id, record_id | Permanently deletes one record. |
Project secrets (env vars)
Values are encrypted at rest (Supabase Vault) and never round-trip through a tool response or reach the browser directly. Read Conventions & Gotchas before using these — the rule that matters most is: never invent a value for a real credential.
| Tool | Arguments | What it does |
|---|
declare_project_secret | page_id, key, exposure? | Registers a named env var with no value — the human enters the real value themselves in Studio → Secrets. The right default for almost every real API key. |
set_project_secret | page_id, key, value, exposure? | Sets a value you already have. Only use this when the user has explicitly pasted that exact value into the conversation themselves. |
list_project_secrets | page_id | Lists key names, exposure mode, and whether each is configured. Never returns values. |
delete_project_secret | page_id, key | Permanently deletes one secret. |