Sasha MCP reference

Research runs for a business brain

This is the surveys section of the usage guide. Call getDocs with { "section": "surveys" } to read it on an instance.

Available only when surveyPublicContext and checkSurvey are in your tool list. They are offered to a member whose connection holds skills:run-contained (with knowledge:read and knowledge:write), on an instance where research runs and document writing are both switched on. Admin and staff connections never get them.

surveyPublicContext starts a research run that drafts the Public Context documents of one business brain from public sources: legal entity and ownership, offer surface, market position and competitors, public footprint, a synthesis with an inconsistencies table, and citations. It takes 5 to 25 minutes.

  • The run works in a closed folder with read-only copies of the brain's documents and the web. It cannot read anything else.
  • It creates only documents that do not exist yet, through the same path as writeDoc. It NEVER replaces a document: for one that exists, it writes a suggestion into _public-context-suggestions.md in the brain folder. Its receipt is _setup-public-context-run.md.
  • Arguments: brain (a brain id; the folder may be new, and the run then creates brain.md), runId (8-64 characters of A-Z a-z 0-9 . _ -; keep it) and identity (legalName and website required). The owner must confirm the identity before you call it.
  • The answer names willCreate and willSuggest: which documents the run can create and which it can only suggest changes to.
  • Poll checkSurvey with the runId every two minutes. When the run has finished it returns the receipt: created, suggested, and refused with a reason for each file. target_exists there is not a fault: that document already existed, so its text is a suggestion.
  • The same runId again returns the run while it runs or after it succeeded. After a run that failed, timed out or ended partial, it starts the next attempt, which sees what the earlier attempt created.
  • A refused start says rate_limited:<reason> and ends with {"retryAfterSeconds":N}. Start again after that many seconds with the same runId and identity. Another person's run and an unknown runId both answer "Not found".
Built with BernardCookie settings