What it does
Get one site and the files in its draft. current_version_id is the version visitors see. published_at is the first publish time and does not change. last_published_at updates on every publish. The rename object says how many renames are left and what happens to the old address. fields returns only some parts, such as ["agent_guide"]. hash fingerprints the answer; with if_hash set to it, an unchanged site answers only { unchanged: true, hash }.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
site_idrequired | string | The id of the site. list_sites gives the ids of your sites. |
fields | array of string | Parts to return, such as ["agent_guide"]: site keys (agent_guide, title, settings, status and the others site holds) and "files" for the draft file list. site.id always comes back; the hash then covers only these parts. |
if_hash | string | The hash from an earlier answer of this tool with the same arguments. When the content is the same, the answer is only { unchanged: true, hash }. |
draft | string | Optional name of your own draft of this site (lowercase letters, digits and dashes, at most 40), such as "pricing-redesign". Each agent has its own drafts, so other agents' work never mixes into yours; give a name when you might work on this site from more than one chat at once, and use the same name on every read, write and publish of that piece of work. Without it you use your default draft. |
Example
Call get_site with these arguments:
{
"site_id": "01a1…"
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Your first siteFrom an empty Hive to a live page in four steps.
- Make a site private or publicWho can open your site, and how to change it.
- Preview the draftSee your agent's changes on your site before they go live.
- Find and change across pagesYour agent finds every place something is used and changes it in one go.