gsc_list_sites
List every Search Console property the account can view, then cache them so page URLs are routed to the correct property without extra API calls.
Instructions
List every Search Console property this account can see.
Costs one Search Console API call (sites.list) — no per-property
quota is spent. Persists each property into the local store (upserted
by property URL) so other tools can route a page URL to its property
without another network round trip; an existing row's sitemaps are
left untouched here, since this call does not fetch or change them.
Returns [{"property", "host", "permission"}, ...] sorted by
property. On a missing, expired, or rejected token, returns
{"ok": False, "error": "auth_required", "fix": ...} instead of
raising; if no OAuth client is configured at all, returns
{"ok": False, "error": "not_configured", "fix": ...} instead — in
either case the caller can surface fix directly rather than parsing
an exception. A Search Console error returns {"ok": False, "error": "api_error", "status": <http status>, "fix": ...}, and anything else
{"ok": False, "error": "unexpected", "detail": <exception type>, "fix": ...}. An EMPTY LIST therefore means what it says — this
account really has no properties — and never a call that was refused.
Does not fetch sitemaps, index status, or search analytics; see gsc_doctor, gsc_check_status, and gsc_performance for those. A property already known to the store keeps whatever sitemaps a prior gsc_submit_sitemaps() call recorded against it — this call never fetches or clears that list, so a routine refresh cannot erase it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |