Docs

Site context

The call an agent should make before its first publish.

get_site_context is the cheapest way to stop an agent guessing. One call tells it what the site is, what it can do, and how it should sound.

What it returns

  • The site handle — the value to pass as the site parameter, rather than a URL the agent had to normalise itself.
  • The approval policy, so the agent can tell you honestly whether the post will go live or wait for you.
  • Existing categories and tags, so it reuses "Product" instead of creating "product", "Products" and "Product News".
  • Brand voice notes you saved for the site.
  • SEO capability — whether seo_title, meta_description and focus_keyword will actually be written.

When to call it

  • Before the first publish of a session.
  • When the person names a site rather than a handle.
  • Before writing SEO fields, so the agent knows in advance whether they will land.
  • After you change a policy or add categories in the dashboard.

site_health is the other one

get_site_context reads what Pressbotics already knows. site_health goes and asks the site again: WordPress version, companion plugin detection, SEO capability. Use site_health after installing or updating a plugin, or when something that used to work stopped.

What can go wrong

  • Context looks stale because the last probe predates a change on the site. Run site_health.
  • The site was disconnected, so there is no stored credential to probe with. Reconnect it.
  • An agent that skips context and invents a handle. Have it call list_sites first.