hyphertext/docs

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

ToolArgumentsWhat it does
get_startednonePlatform overview, workflow, and conventions — call this first.
get_account_statusnoneCaller's subscription tier, site limit vs. published count, page limit vs. total pages.

Pages

ToolArgumentsWhat it does
list_pageslimit?, offset?Lists the caller's pages — id, title, publish state, visibility, source, timestamps.
get_pagepage_idFull page including html_content and public_app_key (the runtime endpoint key — see Runtime Endpoints).
create_pagetitle, html, publish?Creates a page from HTML you supply. html is required — this tool does not generate HTML. Optionally publishes immediately.
update_page_htmlpage_id, htmlFull replace of a page's HTML. Snapshots the previous version first (revertable). Prefer str_replace_page_html for small edits.
str_replace_page_htmlpage_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_pagepage_id, publish, caption?, show_on_profile?, visibility?Publishes or unpublishes. visibility: "private" restricts the page to its owner, signed in.
delete_pagepage_idPermanently 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.

ToolArgumentsWhat it does
list_project_filespage_idLists auxiliary files (path, content type, size, timestamps).
get_project_filepage_id, pathFetches one file's full content.
create_project_filepage_id, path, contentCreates a new file. Fails if the path already exists. Path can't be index.html, start with /, or contain ...
update_project_filepage_id, path, contentFull replace of an existing file. Fails if it doesn't exist yet.
str_replace_project_filepage_id, path, old_str, new_str, replace_all?Same find/replace semantics as str_replace_page_html, for a non-entrypoint file.
delete_project_filepage_id, pathPermanently 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:

ToolArgumentsWhat it does
list_assetspage_idLists files attached to a page, including extracted text / vision description where available.
Default — chunked upload over the MCP channel itself, always works
start_asset_uploadpage_id, file_name, content_typeStep 1/3. Reserves a slot, returns asset_id and the exact chunk size to use.
upload_asset_chunkasset_id, chunk_index, chunk_base64Step 2/3. Send once per chunk, in order, starting at 0.
finish_asset_uploadasset_idStep 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_urlpage_id, file_name, content_typeReturns a one-time signed URL to PUT raw bytes directly to storage (no base64, no MCP channel).
confirm_asset_uploadasset_idVerifies the PUT landed and finalizes the asset row.
Small files only, single call
upload_assetpage_id, file_name, content_type, content_base64Inline base64 upload in one call. Only for small files (~225KB raw or less) — use the chunked flow above it.
delete_assetpage_id, asset_idRemoves 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.

ToolArgumentsWhat it does
db_insertpage_id, collection, dataInserts one JSON document.
db_querypage_id, collection, filter?, limit?, offset?Lists records, newest first. filter matches records containing all given key/value pairs.
db_updatepage_id, record_id, dataReplaces one record's data field by id.
db_deletepage_id, record_idPermanently 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.

ToolArgumentsWhat it does
declare_project_secretpage_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_secretpage_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_secretspage_idLists key names, exposure mode, and whether each is configured. Never returns values.
delete_project_secretpage_id, keyPermanently deletes one secret.