Books, pages and links
Worlds. A world is the wiki and every book written in it. list_worlds shows the author's worlds; pass world (id, title or a unique part of the title) to any tool when there is more than one. create_world starts an empty, unrelated one and rename_world retitles the current one, both only when the author asks.
Books. A book is a page of type book that contains its chapters, so it has a slug, can be linked ([[the-salt-road]]) and described like any page. A world with no book page is simply one book. list_books shows the books in series order. create_book gives a new world its first book, or starts another one in the same world (a sequel, a prequel, a spin-off): it shares every page and the one timeline. get_outline and export take book; create_node with type chapter takes book to say where the chapter goes. Retitle a book with update_node; its place in the series is core.order. A book whose status is final is published: do not propose changes to its text.
Nodes. Everything is a node: book, scene, chapter, map, character, place, faction, item, event, rule (a rule of the world), plot (a thread), idea.
list_nodesgives compact cards by type;get_nodegives one in full (id or slug);searchfinds by meaning.create_nodemakes one.update_nodechangescorefields at once:title,status(draft, active, final, archived;finalon a book means published),importance1 to 3,story_time(a label and anordernumber),pov(the point-of-view character: slug, id, title or other name, stored as the slug; a name that is no character is refused),aliases(other names the text uses),voice(how a character speaks),plan(scenes, chapters and books: what should happen there; this is the outline, it is never exported, andget_outlinereturns it, so read it before drafting a scene and write down only what the author decided). Passingcontentfiles a revision instead.delete_nodearchives; nothing is destroyed.- A slug is set once from the first title and never changes, so renaming a page never breaks a link.
set_extractedstores your summary, keywords and open questions for a page. These are your notes; the author's fields are never touched by it.
Manuscript order. get_outline lists chapters in order with their scenes, and scenes not yet in a chapter as unfiled. A scene belongs to a chapter through a contains edge with an order. Give create_node a chapter (and optionally position) to make the scene in its chapter in one call; create_edge from the chapter to the scene files an existing one. split_scene and merge_scenes restructure without changing a word. Never put a boundary in a scene's text: a rule (---, ***, ___) is a scene break and a #/## heading (or a line underlined with --- or ===) is a chapter break, so create_node, update_node and submit_revision refuse scene text that has one. A section break inside a scene is a line with ⁂.
Who is in a scene. A character (or place, item, thread) is in a scene when the scene's text links to them, or when a tie joins them: create_edge from the scene to the character, kind appears_in, optionally with a few words ("arrives late"). The tie starts at the scene; the other way round is flagged by lint_graph. For a planned scene with no text yet, the tie is the way. The POV character counts as present.
Links and relationships. [[slug]] or [[slug|shown text]] in content links to a page; link_mentions adds such links to existing prose and refuses any change to the visible words. Links become edges by themselves. create_node and update_node return names_to_link for names of existing pages that the text leaves plain, each with how sure MechaSquid is (confidence): link the ones you meant. MechaSquid links names it is sure of by itself (the author's setting) a few minutes after the last change, and shows the author the rest; lint_graph with min_severity: "info" lists pages that still have some (unlinked_mention). A plan is plain text in a box: write names in it plainly, and MechaSquid ties the plan's page to the pages it names (ties with source plan). Other relationships (related, family, membership, and so on) are made with create_edge, optionally valid only between two story times (valid_from, valid_to). list_edges and neighborhood read them. Edge weights are computed; do not try to set them. update_edge and delete_edge change or remove one.
Export. export builds the manuscript as Markdown or EPUB and returns a private link that lasts an hour.
Pictures. Any page can carry pictures: a portrait, a place, a map (page type map), cover art on a book's page. list_images shows what a page or the world already has. add_image puts one on a page: send the file as data_base64, or a public https url (links to pictures made inside a chat app usually do not open from outside, so prefer the data). If you generated the picture, pass your prompt too, so the author can adjust it and ask again. The first picture becomes the page's main one; set_main_image changes that, only when the author asks. Removing pictures is the author's, on the website. Before illustrating, read the page and list_images for the people and places in it, so a character looks the same from one picture to the next; ask the author for the world's art style if the pictures so far do not make it plain.
Pictures in the text. A picture can also stand inside a page's text, a scene's above all: a map at the front of a book, a diagram in a non-fiction chapter, art that opens a chapter. Write it on a line of its own as , with the id from list_images or add_image (which answers with the exact line). Never the picture's url: it carries a key and changes. MechaSquid refuses text that names a picture the world does not have. The caption is optional; it shows under the picture and is read aloud by screen readers. A picture is always the width of the text, with no size or float. It goes into the EPUB and Markdown exports and into shared copies. A book carries at most 200 different pictures; GIFs are not taken anywhere.