Write a guide

A guide is the write-up that opens in the chart's right-hand panel, with a short summary and a "How it works" section. After it is published, Community shows a small book icon next to the script name.

You write the script first. The AI can then write the guide, using the same checks as the editor on the site.

What it needs#

  • The script must already be saved. Use list_scripts to get its id, or save_script if you are writing a new one.
  • Only you can save or publish the guide for a script you own.
  • To show the guide to other members, the script must be Invite-only or Public. Use set_script_visibility first if it is still Only me. A draft can still be saved while the script is private.

Publish a guide#

Call publish_guide with the script id and the content. The content has:

  • summary, a short line of up to 140 characters. This is required when publishing.
  • blocks, up to 40 blocks. A block is a heading, a paragraph, a list, a picture, or a YouTube video.

A successful publish makes has_guide true. The guide then appears in Indicators the same way one you wrote yourself does.

To check what is saved, call read_guide with the same script id. For a script you own, the answer includes the draft, the published version (or none), and has_guide.

Save a draft#

save_guide writes a draft that only you can see. It does not change what readers see, and has_guide stays as it was. Call publish_guide when the guide is ready.

Pictures and videos#

The connector cannot upload pictures. Add those in the guide editor on the site. If a picture is already uploaded for that script, an image block may use its id.

A video block takes a YouTube video id.

If a call is refused#

  • guide_not_found means the script was not found, or it is not yours to change.
  • guide_private_script means the script is still Only me. Set it to Invite-only or Public, then publish again.
  • guide_invalid means some of the content is not valid, for example a missing summary or an unfinished block. The answer names the problems. Fix them and call again. Nothing was saved.