{"at":"2026-11-23T03:00:15.609Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:00:16.032Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T03:00:16.133Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T03:00:16.533Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"instructions":"Margins reads and proposes writes to a Markdown vault on the user's disk.\n\nSTART EVERY CONVERSATION by calling margins_start once. It returns vault\nstats, pending proposals, uningested raw files, recent user preferences,\nand the vault's CLAUDE.md if present. Use that context to ground your\nanswers and follow the user's filing conventions.\n\nANSWERING: cite specific file paths for every claim you make about the\nvault. \"Based on wiki/career/career.md, ...\" beats \"based on your notes.\"\nIf you make a claim without a citation, the user can't verify you.\n\nWRITING (everything is a proposal — nothing lands until the user accepts):\n- Before propose_edit, call read_page to see current content.\n- Before propose_page, call search_vault to check for existing similar pages.\n- Before any propose_*, call recall_preferences to follow the user's filing\n  conventions and naming patterns. The user's CLAUDE.md and preferences are\n  authoritative; your defaults are not.\n- Before propose_compile_from_raw, call get_vault_context to see the vault's\n  entity slugs, active project slugs, and tag taxonomy. Use those slugs for\n  [[wikilinks]] in body sections and key_links frontmatter, those tag names\n  for the tags frontmatter (do NOT invent region/X or vibrance/X — those are\n  auto-computed by scripts/wiki_regions.py and will be overwritten).\n\nLEARNING: when the user corrects a proposal (changes the path you picked,\nrenames a slug, asks for shorter takeaways, etc.), call record_preference\nwith a one-line rule capturing the correction. Margins remembers it for\nnext time. Don't record every minor disagreement; record durable rules\nabout filing conventions, naming patterns, structural rules.\n\nINGESTING: source documents (transcripts, notes, PDFs, Word docs, spreadsheets, decks, emails, EPUBs, etc.) live in folders Margins watches for compilation. By default that's raw/, but the user can set MARGINS_INGEST_ROOTS (comma-separated paths) to point Margins at additional folders. Call list_unprocessed to see files that haven't been compiled. To file one into the wiki, call propose_compile_from_raw with the file's vault-relative path and a summary you generate by reading the file. Files outside the watched roots are still compilable if you pass an explicit path — they just won't appear in list_unprocessed.\n\nTRUST: when the user has placed a source document in raw/ and named it, treat its existence and authorship as given. Don't gate compile on whether you can verify the document's claims from training data — the source page records what the file SAYS, not what you independently know. If the file postdates your knowledge cutoff, that's fine; compile with framing like \"Per the document: ...\" rather than asserting facts as your own knowledge.\n\nEFFICIENCY: when answering a question that spans multiple pages, fire read_page calls in PARALLEL in a single turn, not sequentially. Sequential reads multiply latency for no benefit. Same for search_vault when querying multiple terms.\n\nTOOL INVENTORY: if you're unsure whether a Margins tool exists or what parameters it accepts, search/list available tools rather than asserting from prior turn state. Optional parameters like propose_compile_from_raw's force=true are easy to overlook; check the schema when a workflow calls for one.\n\nTESTING MODE: when the user explicitly frames an action as testing or pressure-testing (e.g., \"fire both calls back-to-back\", \"this is a test\", \"validate the reject path\"), the propose-then-review pattern can be batched without breaking trust — they have consented to the merged flow. If they provide exact tool parameters and say not to accept a staged proposal, execute that tool call as specified after at most one clarification. Default production review remains on; test batching is allowed only when the user names it as a test.\n\nTOOLS:\n- Context: margins_start, recall_preferences, get_vault_context\n- Read: search_vault, read_page, list_recent, get_backlinks, list_unprocessed, margins_doctor\n- Propose writes: propose_page, propose_edit, append_to, propose_compile_from_raw (supports split mode for multi-section docs)\n- Suggest: propose_wikilinks (single-page or scope=glob for A3/B3 vaults with few links; apply=true stages rewritten pages)\n- Discover: scan_entity_candidates (find recurring capitalized phrases with no matching slug — A3 cold-start), propose_entity_stubs (stage stub entity pages from scan output; reject events feed .margins/entity-rejections.md so the same slugs don't reappear next scan)\n- Manage proposals: list_proposals (pattern/limit/sortBy), resolve_proposal (path OR pattern for bulk, dryRun, maxCount), margins_reset_proposals\n- Learn: record_preference\n- ChatGPT Deep Research: search, fetch","protocolVersion":"2025-11-25","serverInfo":{"description":"Use your Claude Pro/Max subscription on your Obsidian vault. Reads markdown, proposes writes, and compiles raw source files into wiki source pages.","icons":[{"mimeType":"image/svg+xml","src":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCI+CiAgPHN0eWxlPgogICAgLm1hcmstYmcgeyBmaWxsOiAjZmFmN2YyOyBzdHJva2U6ICMxYTE2MTI7IH0KICAgIC5tYXJrLXNwaW5lIHsgc3Ryb2tlOiAjMWExNjEyOyB9CiAgICAubWFyay1ibHVlIHsgZmlsbDogIzJjNWFhMDsgfQogICAgLm1hcmstcmVkIHsgZmlsbDogI2Q2M2EyZjsgfQogICAgLm1hcmstY29yZSB7IGZpbGw6ICMxYTE2MTI7IH0KICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgLm1hcmstYmcgeyBmaWxsOiAjMTUxMTBkOyBzdHJva2U6ICNlOGUyZDY7IH0KICAgICAgLm1hcmstc3BpbmUgeyBzdHJva2U6ICNlOGUyZDY7IH0KICAgICAgLm1hcmstYmx1ZSB7IGZpbGw6ICM1Yjg2Yzk7IH0KICAgICAgLm1hcmstcmVkIHsgZmlsbDogI2UwNGIzZjsgfQogICAgICAubWFyay1jb3JlIHsgZmlsbDogIzE1MTEwZDsgfQogICAgfQogIDwvc3R5bGU+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPgogICAgPHJlY3QgY2xhc3M9Im1hcmstYmciIHg9IjgiIHk9IjgiIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgcng9IjExIiBzdHJva2Utd2lkdGg9IjQiLz4KICAgIDxwYXRoIGNsYXNzPSJtYXJrLXNwaW5lIiBzdHJva2Utd2lkdGg9IjciIGQ9Ik0xOSAxNXYzNCIvPgogICAgPHBhdGggY2xhc3M9Im1hcmstYmx1ZSIgZD0iTTMwLjggMTguNGM3LjQtNC42IDE3LjUtLjIgMTkuNCA4LjIgMi4xIDkuMS01LjIgMTkuNi0xNC44IDE5LjYtOC41IDAtMTQuOS04LjMtMTIuOS0xNi4zIDEuMS00LjcgNC40LTkuMSA4LjMtMTEuNVoiLz4KICAgIDxwYXRoIGZpbGw9IiNmMGMxNGIiIGQ9Ik0zMy4xIDIzLjNjNS4xLTMuNCAxMi4xLS44IDEzLjkgNC45IDEuOCA2LjItMyAxMy43LTkuNSAxMy44LTUuOC4xLTEwLjQtNS40LTkuNC0xMSAuNS0zLjMgMi4zLTYgNS03LjdaIi8+CiAgICA8cGF0aCBjbGFzcz0ibWFyay1yZWQiIGQ9Ik0zNi4yIDI3LjRjMi44LTEuOSA2LjgtLjUgNy44IDIuNyAxIDMuNC0xLjggNy41LTUuNCA3LjUtMy4xLjEtNS44LTIuOC01LjMtNS45LjMtMS44IDEuMy0zLjMgMi45LTQuM1oiLz4KICAgIDxjaXJjbGUgY2xhc3M9Im1hcmstY29yZSIgY3g9IjM5IiBjeT0iMzMiIHI9IjIuNCIvPgogIDwvZz4KPC9zdmc+"}],"name":"margins","version":"0.15.0","websiteUrl":"https://marginsmcp.com"}}}}
{"at":"2026-11-23T03:00:16.533Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:00:16.533Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:00:16.538Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"readOnlyHint":true},"description":"Conversation-start primer. Always call this once at the start of every vault-relevant conversation. The response includes a 'mode' field — read it and follow the 'guidance' field tailored to that mode: (1) mode='pile' for unstructured many-file vaults — returns a time-stratified sample of vault files, filename patterns, and (importantly) a rawScan with a priorityQueue of raw/ files to compile FIRST via propose_compile_from_raw. If priorityQueue is non-empty, your best opening move is to compile those files in parallel in a single turn (read_page each to get readable text, then propose_compile_from_raw with a structured summary) — the user dropped source documents and wants wiki source pages within ~90 seconds. (2) mode='empty' for near-empty vaults — ask what the user wants and offer to scaffold. (3) mode='synthesis' for organized linked vaults — returns folder stats, pending proposals, uningested files, recent user preferences, and the vault's CLAUDE.md. Ground answers in this structure and cite file paths. All modes also return pendingProposals, uningestedRaw, recentPreferences, and vaultManual.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"margins_start"},{"annotations":{"readOnlyHint":true},"description":"Read the user's vault-scoped preferences file (.margins/preferences.md). Returns durable rules the user has stated or that you've recorded via record_preference. Call this before any propose_* tool so your proposals follow the user's filing conventions, naming patterns, and prior corrections.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"recall_preferences"},{"annotations":{"readOnlyHint":true},"description":"Read the vault's wikilinking context: entity slugs (people, organizations, places, tools, projects), active project/decision slugs (priority=active or recently updated), and the in-use semantic tag taxonomy. Call this BEFORE propose_compile_from_raw so the page you stage uses real entity slugs in [[wikilinks]] (not invented names) and existing tags (not new variants). Region/X and vibrance/X tags are excluded from the response — those are auto-computed by scripts/wiki_regions.py and must not be model-generated. Cached on a vault-mtime key; safe to call repeatedly.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"refresh":{"description":"Force a re-scan even if the vault hasn't changed since the last call. Default false (use cache).","type":"boolean"}},"type":"object"},"name":"get_vault_context"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Record the user's choice on anonymous telemetry. Call this exactly once, only when the margins_start response had telemetryConsentNeeded=true AND the user has answered the in-chat opt-in question. Pass enabled=true if they said yes, enabled=false if they said no. The choice persists in ~/.margins/consent.json and applies to all future Margins sessions.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"enabled":{"description":"True if the user opted in, false if they declined.","type":"boolean"}},"required":["enabled"],"type":"object"},"name":"record_telemetry_consent"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Append a durable user preference, convention, or correction to the vault's preferences file. Call this when the user corrects a proposal in a way that should apply next time (filing path, naming pattern, summary length, link style, etc.). Do NOT record one-off disagreements or transient feedback. Aim for one-line rules.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"category":{"description":"Optional category tag. Examples: 'filing', 'naming', 'voice', 'structure'.","type":"string"},"observation":{"description":"One-line rule capturing the durable preference. Example: 'Mark Loh meeting notes file under wiki/projects/ not wiki/personal/.'","type":"string"}},"required":["observation"],"type":"object"},"name":"record_preference"},{"annotations":{"readOnlyHint":true},"description":"Full-text + filename search across the Margins vault. Returns top hits with path and snippet.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"description":"Max results to return. Default 10.","maximum":50,"minimum":1,"type":"integer"},"query":{"description":"Search string. Case-insensitive substring.","type":"string"}},"required":["query"],"type":"object"},"name":"search_vault"},{"annotations":{"readOnlyHint":true},"description":"Read a single vault file by relative path (e.g. 'wiki/career/career.md' or 'raw/report.pdf'). Extracts readable text from supported document formats before returning it.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"path":{"description":"Path relative to the vault root.","type":"string"}},"required":["path"],"type":"object"},"name":"read_page"},{"annotations":{"readOnlyHint":true},"description":"List the most recently modified vault files. Use this to answer 'what did I just ingest / update'.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"description":"Default 20.","maximum":100,"minimum":1,"type":"integer"}},"type":"object"},"name":"list_recent"},{"annotations":{"readOnlyHint":true},"description":"Find vault pages that link to a target slug or filename. Matches [[wikilinks]] and relative .md links.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"description":"Default 25.","maximum":100,"minimum":1,"type":"integer"},"target":{"description":"Slug or filename without extension.","type":"string"}},"required":["target"],"type":"object"},"name":"get_backlinks"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Scan vault pages for entity-shaped phrases and propose wikilinks to other vault pages that share the same slug. Two modes:\n (1) single-page — pass `path`, get a ranked list of {phrase, wikilink, occurrences} for that one page.\n (2) scope — pass `scope` (glob/folder), scan every matching page using one shared slug index (much faster than calling repeatedly), get aggregated suggestions across pages.\n With `apply: true` in scope mode, Margins stages one rewritten page per scanned page (a propose_page proposal that replaces every candidate phrase with its wikilink). Apply mode preserves the proposal-review contract — nothing lands until resolve_proposal accepts.\n Useful for A3/B3 personas (many files, few wikilinks): scope across a folder finds entity references that already have target pages.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"apply":{"description":"Only meaningful in scope mode. When true, stage a rewritten page per scanned page with all wikilink suggestions applied (one propose_page per page, NOT per phrase). Review/accept via list_proposals + resolve_proposal. Default false (suggest only).","type":"boolean"},"maxPages":{"description":"Cap on pages scanned in scope mode. Default 50.","maximum":500,"minimum":1,"type":"integer"},"maxSuggestions":{"description":"Cap on suggestions per page. Default 15.","maximum":50,"minimum":1,"type":"integer"},"path":{"description":"Page path for single-page mode, e.g. 'wiki/career/career.md'. Mutually exclusive with scope.","type":"string"},"scope":{"description":"Glob for bulk-scope mode, e.g. 'wiki/sources/**' or 'Anatomy/*.md'. Mutually exclusive with path.","type":"string"}},"type":"object"},"name":"propose_wikilinks"},{"annotations":{"readOnlyHint":true},"description":"Find capitalized phrases that recur across vault pages but have no matching slug — i.e. entities the user keeps mentioning without having a page for them. This is the inverse query of propose_wikilinks: instead of 'where should I add a wikilink to an existing page?', it answers 'what page should exist that doesn't yet?'.\nReturns candidates ranked by file-spread × mention-count, with snippets and the list of files where each appears. Read-only — never stages. The companion tool propose_entity_stubs takes the slugs you choose from this list and stages stub entity pages.\nLayered filtering: a global English/structural stoplist, an optional domain pack ('med', 'realestate', 'law', 'generic'), and an optional excludeUserRejections list (slugs the user already rejected). Existing slugs are excluded automatically — the shared vault-slug index is the same one propose_wikilinks uses.\nBest used right after a fresh import or split-mode compile, when the corpus has many entity references but few entity pages.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"domain":{"description":"Domain pack to apply on top of the global stoplist. 'med' drops Step One / Gram Positive / Stage III etc; 'realestate' drops Class A / Phase II / Due Diligence; 'law' drops Section / Article / Chapter; 'generic' (default) applies only the global list.","enum":["generic","med","realestate","law"],"type":"string"},"excludeUserRejections":{"description":"Slugs the user has previously declined. Wired by propose_entity_stubs in v0.16+ to read rejection memory from .margins/preferences.md; you can also pass it ad-hoc.","items":{"type":"string"},"type":"array"},"limit":{"description":"Cap on candidates returned. Default 50. Total candidate count is in candidatesFound so callers can tell if there are more behind the cap.","maximum":500,"minimum":1,"type":"integer"},"minFileSpread":{"description":"Minimum number of distinct files a candidate must appear in. Default 3. Catches phrases that recur many times in one file (often boilerplate) and treats them as low-signal.","maximum":500,"minimum":1,"type":"integer"},"minMentions":{"description":"Minimum total mentions across the scope before a candidate qualifies. Default 5. Lower to surface more (noisier); raise for high-confidence only.","maximum":1000,"minimum":1,"type":"integer"},"minPhraseWords":{"description":"Minimum word count for a candidate to qualify. Default 2 — single-word sentence-start capitals are the dominant noise source on real vaults. Acronyms (AI / MBA / MCP, all-caps 2-6 letters) bypass this filter and surface regardless. Drop to 1 to also see single-word surnames like 'Holmes' or 'Cardozo' (raises recall, raises noise).","maximum":5,"minimum":1,"type":"integer"},"scope":{"description":"Glob to limit the walk. Default 'wiki/**'. Pass a folder glob like 'Path/**' to scope to one subject. Supports *, **, ?.","type":"string"}},"type":"object"},"name":"scan_entity_candidates"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Stage stub entity pages for a list of candidate slugs (typically from scan_entity_candidates). Each stub becomes a proposed page at wiki/<bucket>/<slug>.md (default bucket 'entities') with frontmatter type:entity + a from_scan marker, an auto-built '## Mentioned in' block linking source files when snippets/files are provided, and a '## Next' checklist.\nSkips slugs whose destination page already exists in the vault — edit those directly instead of overwriting them.\nCloses the cold-start loop: scan finds names with no page; this stages the pages; resolve_proposal accepts the ones the user wants. Reject events on a stub (single or bulk) automatically append the slug to .margins/entity-rejections.md so it doesn't re-surface in the next scan.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"bucket":{"description":"Bucket folder for the stubs. Default 'entities'. Pick a topical bucket if the candidates share a theme ('people', 'cases', 'firms').","type":"string"},"candidates":{"description":"Array of candidate slugs (strings) or candidate objects (forward the scan_entity_candidates payload verbatim for the richest stub bodies). Limit 200 per call to keep the proposal queue reviewable.","items":{"anyOf":[{"type":"string"},{"properties":{"fileCount":{"type":"number"},"files":{"items":{"type":"string"},"type":"array"},"mentionCount":{"type":"number"},"phrase":{"type":"string"},"slug":{"type":"string"},"snippets":{"items":{"properties":{"file":{"type":"string"},"snippet":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}]},"maxItems":200,"minItems":1,"type":"array"}},"required":["candidates"],"type":"object"},"name":"propose_entity_stubs"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Propose a new page in the vault. Body is the full markdown (frontmatter optional). The page is staged at proposed/<path> until the user accepts it via resolve_proposal. Errors if a page already exists at this path in the vault — use propose_edit or append_to in that case.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"body":{"description":"Full markdown body to write.","type":"string"},"path":{"description":"Destination path relative to vault root, e.g. 'wiki/projects/foo.md'.","type":"string"}},"required":["path","body"],"type":"object"},"name":"propose_page"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Propose an edit to an existing page via exact string replacement. 'before' must appear exactly once in the current file (or in the pending proposal if one exists); add surrounding context if it doesn't. The edit is staged at proposed/<path>.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"after":{"description":"Replacement text. Empty string deletes the match.","type":"string"},"before":{"description":"Exact text to replace. Must be unique in the file.","type":"string"},"path":{"description":"Page path relative to vault root.","type":"string"}},"required":["path","before","after"],"type":"object"},"name":"propose_edit"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Append content to the end of a page. If the page doesn't exist, it's created. If a pending proposal exists for the path, the append stacks on top of it. Result is staged at proposed/<path>. If the user asks for final proposed content, read proposed/<path> after appending instead of inferring.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"content":{"description":"Content to append. A newline separator is added if needed.","type":"string"},"path":{"description":"Page path relative to vault root.","type":"string"}},"required":["path","content"],"type":"object"},"name":"append_to"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Compile a supported source file (.adoc, .asciidoc, .conf, .csv, .docx, .eml, .epub, .htm, .html, .ini, .json, .log, .markdown, .md, .mdx, .odp, .ods, .odt, .org, .ott, .pdf, .pptx, .rst, .rtf, .srt, .tex, .text, .toml, .tsv, .txt, .vtt, .xlsm, .xlsx, .xml, .yaml, .yml) into a wiki source page proposal staged at proposed/<wiki path>. \n\nIMPORTANT — produce a knowledge artifact, not a topic recap. The page you stage is the substrate the user (and future Claude sessions) will retrieve from. Thin pages = thin retrieval. \n\nBefore calling, call get_vault_context to know which entity slugs and active project slugs to wikilink, and which semantic tags are already in use. \n\nFor a meeting/call/transcript: pick content-specific H2 headings that reflect what was actually discussed (e.g. 'Practice Overview', 'Service Philosophy', 'Succession Status' — NOT 'Summary' / 'Bullets' / 'Takeaways'). Quote verbatim where the exact phrasing matters. Wikilink every entity using slugs from get_vault_context. Include a relevanceCallout naming the active projects/decisions this source bears on. Surface 2-4 concrete applications. \n\nFor a synthesis page (pageType='synthesis'): pass the source URLs as `sources`, structure body sections around the argument, include a relevanceCallout. \n\nFor a concept page (pageType='concept'): structure as snapshot + context + source log. \n\nLegacy callers can still pass `summary` + `summaryBullets` + `takeaways` and skip `sections` — Margins will fall back to the simple template. But the rich path is what produces a knowledge artifact.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"applications":{"description":"Concrete questions or applications. Renders as `## Personal applications worth tracking`. 2-4 items typical.","items":{"type":"string"},"type":"array"},"bucket":{"description":"Wiki bucket folder. 'sources', 'projects', 'ideas', 'meetings', 'career'. Pick by topic, not page-type.","type":"string"},"destination_path":{"description":"Override destination path, e.g. 'wiki/career/source-2026-05-13-something.md'.","type":"string"},"eventDate":{"description":"Date the source event occurred (YYYY-MM-DD). Defaults to today.","type":"string"},"force":{"description":"Replace an existing source page for this raw file. Without bucket/destination_path override, the existing source page is replaced IN PLACE (same path). With override, the source moves to the new location. Default false.","type":"boolean"},"headerNote":{"description":"Short paragraph under the H1 giving venue/runtime/context (e.g. 'Stanford GSB fireside chat, ~45 min, published 2026-05-04').","type":"string"},"hubBucket":{"description":"Bucket folder for the hub + segment pages when split mode is set. Defaults to bucket if provided, else 'sources'.","type":"string"},"keyLinks":{"description":"Wikilink slugs for the frontmatter key_links field, e.g. ['ellis-rutili', 'centric-wm', 'briefly']. Use slugs from get_vault_context.","items":{"type":"string"},"type":"array"},"maxSegments":{"description":"Cap on segments staged in a single split call. Default 50. Extra headings beyond the cap are noted in the hub but not staged.","maximum":200,"minimum":2,"type":"integer"},"pageType":{"description":"Page shape. 'source' = faithful summary of one raw file (default). 'concept' = durable theme/idea. 'synthesis' = connection-point across multiple sources.","enum":["source","concept","synthesis"],"type":"string"},"participants":{"description":"For meeting/call pages: participant names. Renders as a participants frontmatter list.","items":{"type":"string"},"type":"array"},"propagationNotes":{"description":"Entity/concept creation decisions made or refused (per operator-manual rule #4). Renders as `## Propagation Notes`.","type":"string"},"quiet":{"description":"Omit the full staged markdown from the response. The page still lands at proposed/<destinationPath> — set quiet=true when compiling many files in one turn so the response payload stays small. Default false.","type":"boolean"},"rawPath":{"description":"Vault-relative path of the source file. Examples: 'raw/foo.pdf', 'meetings/march-7.md'. Pass list_unprocessed paths directly. Bare filename (e.g. 'foo.pdf') resolves to raw/foo.pdf unless an actual root-level foo.pdf exists and raw/foo.pdf does not.","type":"string"},"related":{"description":"Related wiki pages. Either bare slug strings or {slug, note} objects. Renders as `## Related` with `[[wikilinks]]`.","items":{"anyOf":[{"type":"string"},{"properties":{"note":{"type":"string"},"slug":{"type":"string"}},"required":["slug"],"type":"object"}]},"type":"array"},"relevanceCallout":{"description":"Connor-relevance synthesis. Renders as `> [!claude-note]+ Connor-relevance — Claude synthesis`. Body is markdown. Links is an array of wikilink slugs to active projects/decisions this source bears on.","properties":{"body":{"type":"string"},"links":{"items":{"type":"string"},"type":"array"}},"required":["body"],"type":"object"},"sections":{"description":"Primary body — array of {heading, body} sections. Pick content-specific H2 headings that fit the source. Body is markdown; may include [[wikilinks]], tables, blockquotes, bold key terms. Quote verbatim where phrasing matters. If you provide sections, the legacy summary/bullets/takeaways template is skipped.","items":{"properties":{"body":{"type":"string"},"heading":{"type":"string"}},"required":["heading","body"],"type":"object"},"type":"array"},"sourceCaveat":{"description":"Source-quality warning — renders as a `> [!info]+ Source caveat` callout. Use when the source has limitations (e.g. 'Granola summary, no transcript available').","type":"string"},"sourceUrl":{"description":"External URL if the source has one (YouTube, blog post, public PDF). Renders as a markdown link in the header block.","type":"string"},"sources":{"description":"For synthesis pages: list of evidence URLs. Renders as a sources frontmatter list.","items":{"type":"string"},"type":"array"},"split":{"description":"Split-mode trigger. When set, the raw file is segmented at the chosen boundary and Margins stages one source page per segment plus a hub page that wikilinks them. 'heading-h1' / 'heading-h2' segment by Markdown-style heading level (works for MD/HTML and any extractor that emits H markers like XLSX/PPTX). 'sheet' is alias for h2 splits, ergonomic for spreadsheets. 'auto' picks h2 for spreadsheets and h1 elsewhere. Summary is not required in split mode.","enum":["heading-h1","heading-h2","sheet","auto"],"type":"string"},"summary":{"description":"Rich multi-clause summary (NOT 1-3 sentences). REQUIRED unless split mode is set — in split mode each segment is auto-titled from its heading and no summary is needed. For single-source compile this becomes the frontmatter summary used by retrieval.","type":"string"},"summaryBullets":{"description":"LEGACY — for the simple template only. If you provide `sections`, this is unused.","items":{"type":"string"},"type":"array"},"tags":{"description":"Semantic tags (topical, people slugs, firm slugs). DO NOT include region/X or vibrance/X — those are auto-computed by scripts/wiki_regions.py and will be overwritten.","items":{"type":"string"},"type":"array"},"takeaways":{"description":"LEGACY — for the simple template only. If you provide `sections`, this is unused. Either strings or {point, evidence} objects.","items":{"anyOf":[{"type":"string"},{"properties":{"evidence":{"type":"string"},"point":{"type":"string"}},"required":["point"],"type":"object"}]},"type":"array"},"title":{"description":"Title for the page. Defaults to titlecased filename.","type":"string"}},"required":["rawPath"],"type":"object"},"name":"propose_compile_from_raw"},{"annotations":{"readOnlyHint":true},"description":"Diagnose the vault's health. Returns a structured report of issues: orphan source pages (raw_file points to a missing file), tracker drift (source pages without tracker rows, or tracker rows for missing sources), files with malformed frontmatter, and large raw files. Read-only — never modifies the vault. Use when the user asks 'is anything broken?', 'check my vault', or before major operations.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"margins_doctor"},{"annotations":{"readOnlyHint":true},"description":"List vault files that have not yet been compiled into a wiki source page. Files can live anywhere in the vault (raw/ is conventional but not required) — detection works on raw_file: frontmatter, not folder placement. Use this when the user asks 'what haven't I filed yet?' or before a compile pass. Each item is a vault-relative path you can pass directly to propose_compile_from_raw.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"description":"Maximum pending files to return. Default 50.","maximum":500,"minimum":1,"type":"integer"}},"type":"object"},"name":"list_unprocessed"},{"annotations":{"readOnlyHint":true},"description":"List pending proposals with optional filtering. Each entry has proposal path, destination path, whether accepting overwrites an existing vault file, size, and (for overwrites under default settings) a small first-diff preview. Use the pattern filter to scope to a folder or file shape when the queue is large.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"includeDelta":{"description":"Include per-overwrite first-diff preview. Default true. Set false when scanning a large queue — saves N pairs of file reads.","type":"boolean"},"limit":{"description":"Maximum proposals to return. Response includes totalMatched + truncated flag when results are capped.","maximum":500,"minimum":1,"type":"integer"},"pattern":{"description":"Glob to filter destinationPath. Supports *, **, ?. Example: 'wiki/sources/*.md' or 'wiki/projects/briefly-**'.","type":"string"},"sortBy":{"description":"Sort order. 'path' (default) is lexical; 'age' is newest mtime first; 'size' is largest first.","enum":["path","age","size"],"type":"string"}},"type":"object"},"name":"list_proposals"},{"annotations":{"destructiveHint":true,"readOnlyHint":false},"description":"Accept or reject pending proposals. Two modes: (1) single — pass `path` to apply the action to exactly one proposal; (2) bulk — pass `pattern` (glob) to apply the action to every matching proposal. Exactly one of path/pattern is required. Accept moves proposal to its destination atomically (overwriting any existing file at the destination); reject deletes the proposal without touching the vault. Per-destination lock guarantees concurrent edits on the same path serialize. Use `dryRun: true` with a pattern to preview which proposals would be touched without applying anything.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Whether to apply or discard the matched proposal(s).","enum":["accept","reject"],"type":"string"},"dryRun":{"description":"Only meaningful with pattern. When true, return the list of paths that WOULD be affected without applying the action.","type":"boolean"},"maxCount":{"description":"Only meaningful with pattern. Cap the number of proposals processed in a single call.","maximum":500,"minimum":1,"type":"integer"},"path":{"description":"Destination path of a single proposal, with or without the 'proposed/' prefix. Mutually exclusive with pattern.","type":"string"},"pattern":{"description":"Glob to match destinationPath of multiple proposals. Supports *, **, ?. Mutually exclusive with path.","type":"string"}},"required":["action"],"type":"object"},"name":"resolve_proposal"},{"annotations":{"destructiveHint":true,"readOnlyHint":false},"description":"Clear all pending proposals from proposed/. Use when proposals have accumulated from failed Claude sessions, or when the user wants a clean slate. Returns the number of files that would be deleted. Requires confirm=true to actually delete — without confirm, returns a dry-run list. Vault files are never touched; only files under proposed/.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"confirm":{"description":"Pass true to actually delete the pending proposals. Default false returns a dry-run preview.","type":"boolean"}},"type":"object"},"name":"margins_reset_proposals"},{"annotations":{"readOnlyHint":true},"description":"ChatGPT Deep Research search. Returns a list of {id, title, url} where id is the vault path. Pair with fetch.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"query":{"type":"string"}},"required":["query"],"type":"object"},"name":"search"},{"annotations":{"readOnlyHint":true},"description":"ChatGPT Deep Research fetch. Returns {id, title, text, url, metadata} for the given vault path.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"id":{"type":"string"}},"required":["id"],"type":"object"},"name":"fetch"}]}}}
