{"ok":true,"site":{"host":"margin-local-docs.openai.chatgpt.site","url":"https://margin-local-docs.openai.chatgpt.site/","type":"demo","desc":"A private, local-first documentation editor where people and agents can collaborate in the margin.","tools":[{"name":"list_documents","kind":"answer","impl":"imperative","description":"List documents stored in this device-local Margin workspace. Optionally match titles or text and return short snippets.","inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Optional case-insensitive title or document text query.","maxLength":200},"limit":{"type":"integer","description":"Maximum number of documents to return.","minimum":1,"maximum":100,"default":50}},"additionalProperties":false},"executable":true,"handlerField":"execute"},{"name":"get_document","kind":"answer","impl":"imperative","description":"Get one Margin document as stable rich-text JSON and plain text, with comment context for only that document.","inputSchema":{"type":"object","properties":{"document_id":{"type":"string","description":"Stable document ID returned by list_documents."}},"required":["document_id"],"additionalProperties":false},"executable":true,"handlerField":"execute"},{"name":"open_document","kind":"act","impl":"imperative","description":"Open an existing local note by ID and make it the document currently displayed in the Margin editor.","inputSchema":{"type":"object","properties":{"document_id":{"type":"string","minLength":1,"description":"Stable note ID returned by list_documents."}},"required":["document_id"],"additionalProperties":false},"executable":true,"handlerField":"execute"},{"name":"create_document","kind":"act","impl":"imperative","description":"Create and open a new document in this device-local Margin workspace. Content accepts lightweight Markdown or plain text and is stored as structured rich text.","inputSchema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":180,"description":"Title of the new local document."},"content":{"type":"string","maxLength":100000,"default":"","description":"Document body. Markdown supports headings, lists, checklists, quotes, code, links, and basic emphasis."},"format":{"type":"string","enum":["markdown","plain_text"],"default":"markdown"}},"required":["title"],"additionalProperties":false},"executable":true,"handlerField":"execute"},{"name":"update_document","kind":"act","impl":"imperative","description":"Rename or update one local Margin document. Replace or append lightweight Markdown/plain text; existing comments are recovered against their exact quoted context or marked detached.","inputSchema":{"type":"object","properties":{"document_id":{"type":"string","minLength":1,"description":"Stable ID returned by list_documents or create_document."},"title":{"type":"string","minLength":1,"maxLength":180,"description":"Optional replacement title."},"content":{"type":"string","maxLength":100000,"description":"Document content to replace or append."},"format":{"type":"string","enum":["markdown","plain_text"],"default":"markdown"},"mode":{"type":"string","enum":["replace","append"],"default":"replace","description":"Replace the document body or append new rich-text blocks to it."}},"required":["document_id"],"anyOf":[{"required":["title"]},{"required":["content"]}],"additionalProperties":false},"executable":true,"handlerField":"execute"},{"name":"list_comments","kind":"answer","impl":"imperative","description":"List anchored or detached comment threads in the local Margin workspace, filterable by document and status.","inputSchema":{"type":"object","properties":{"document_id":{"type":"string","description":"Optional stable document ID."},"status":{"type":"string","enum":["open","resolved","all"],"default":"open"}},"additionalProperties":false},"executable":true,"handlerField":"execute"},{"name":"add_comment","kind":"act","impl":"imperative","description":"Add an agent-authored comment anchored by exact quote and semantic context. Ambiguous quotes are never attached arbitrarily.","inputSchema":{"type":"object","properties":{"document_id":{"type":"string"},"body":{"type":"string","minLength":1,"maxLength":10000},"exact_quote":{"type":"string","minLength":1,"maxLength":20000,"description":"Exact text currently present in the document."},"occurrence":{"type":"integer","minimum":1,"description":"One-based occurrence when the exact quote repeats."},"prefix":{"type":"string","maxLength":500,"description":"Text immediately before the quote for disambiguation."},"suffix":{"type":"string","maxLength":500,"description":"Text immediately after the quote for disambiguation."},"agent_name":{"type":"string","default":"Codex","maxLength":40}},"required":["document_id","body","exact_quote"],"additionalProperties":false},"executable":true,"handlerField":"execute"},{"name":"reply_to_comment","kind":"act","impl":"imperative","description":"Append an agent reply to an existing local Margin comment thread.","inputSchema":{"type":"object","properties":{"comment_id":{"type":"string"},"body":{"type":"string","minLength":1,"maxLength":10000},"agent_name":{"type":"string","default":"Codex","maxLength":40}},"required":["comment_id","body"],"additionalProperties":false},"executable":true,"handlerField":"execute"},{"name":"resolve_comment","kind":"act","impl":"imperative","description":"Mark a local Margin comment thread as resolved.","inputSchema":{"type":"object","properties":{"comment_id":{"type":"string"}},"required":["comment_id"],"additionalProperties":false},"executable":true,"handlerField":"execute"},{"name":"reopen_comment","kind":"act","impl":"imperative","description":"Reopen a resolved local Margin comment thread.","inputSchema":{"type":"object","properties":{"comment_id":{"type":"string"}},"required":["comment_id"],"additionalProperties":false},"executable":true,"handlerField":"execute"}],"favicon":"/favicons/margin-local-docs.openai.chatgpt.site.png","apiSurface":"spec","_scrape":{"etag":null,"lastModified":null,"scrapedAt":"2026-08-26T07:39:16.338Z"},"category":"Productivity & Business","toolCount":10}}