{"at":"2026-11-23T03:14:14.570Z","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:14:15.508Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"memshelf_mcp","version":"0.4.0"}},"cacheScope":"private","capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"memshelf-mcp 0.4.0: served code 09a0de8d8da3 at /opt/server/tools/memshelf-mcp/lib/python3.13/site-packages/memshelf_mcp; served-code freshness is UNKNOWN — no shelf named on this call or in $MEMSHELF_SHELF_PATH, and $MEMSHELF_CHECKOUT unset. To make it known, clone memshelf-mcp next to the shelf or set MEMSHELF_CHECKOUT=/path/to/memshelf-mcp/src/memshelf_mcp; `memshelf_doctor` reports the same state as `freshness-unknown`.","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-23T03:14:15.508Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:14:15.511Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"memshelf_mcp","version":"0.4.0"}},"cacheScope":"private","resultType":"complete","tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Shelve an episode to the memory shelf"},"description":"Offload one closed topic to the shelf as a durable, indexed episode —\nredaction, digest contract and git commit included. Derived files are not\nwritten here — they are rendered by `memshelf_rebuild` or the shelf's bot.\nDetails: docs/tools.md.","inputSchema":{"$defs":{"ShelveInput":{"additionalProperties":false,"properties":{"amend":{"default":false,"description":"Rewrite an episode already on the shelf, under the same slug (#71): one episode, one recomputed ledger row, redaction and the digest contract re-run. Errors if the slug is not there — that is a typo, not a create.","title":"Amend","type":"boolean"},"approx_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Rough in-window size in tokens; an eyeball estimate is fine. OMIT when nothing was measured or estimated — the episode is then recorded as approx_tokens_source: unmeasured instead of a silent 0 (#113): absence of measurement must not look like a measured zero.","title":"Approx Tokens"},"approx_tokens_source":{"anyOf":[{"enum":["estimate","measured"],"type":"string"},{"type":"null"}],"default":null,"description":"Where the number came from (#79). Default for any passed number is 'estimate' — that is what callers actually produce; say 'measured' only when it was. Contradiction (a source with no number) is refused.","title":"Approx Tokens Source"},"autocommit":{"default":true,"title":"Autocommit","type":"boolean"},"await_render_s":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"After a push: seconds to wait for the shelf bot's render and fast-forward onto it, so the clone ends level with the remote (#157). Omit for the default — wait (60 s) only when the shelf has the shelf-derived bot and the push left derived files out of date; 0 = never.","title":"Await Render S"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"YYYY-MM-DD; always wins. Omitted: amend keeps the existing episode's own date, a new dated slug takes it from its YYYY-MM-DD- prefix, and only an undated slug falls back to today (#170).","title":"Date"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"digest":{"description":"The <=120-word digest; validated before any write.","title":"Digest","type":"string"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Free-form INDEX title; defaults to the slug.","title":"Display Title"},"kind":{"enum":["topic","research","session"],"title":"Kind","type":"string"},"mode":{"default":"live","enum":["live","import"],"title":"Mode","type":"string"},"notes":{"default":"","title":"Notes","type":"string"},"publish":{"default":false,"description":"Publish the shelve commit to origin as a NEW branch shelve/<slug> and report a one-click compare link (#118) — the mode for shelves whose main requires a PR. Exclusive with `push`; the local checkout never switches branches, so recall keeps working from this clone.","title":"Publish","type":"boolean"},"push":{"default":false,"description":"Push the shelve commit; on a rejection, rebase and retry exactly once (#108). The result then carries the post-push sha — the only sha worth quoting, since a rebase rewrites the local one.","title":"Push","type":"boolean"},"retain_until":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Retention (#15): ISO date after which `memshelf purge` drops this episode. Absent means keep — retention is opt-in per episode.","title":"Retain Until"},"sections":{"additionalProperties":{"type":"string"},"description":"H2 heading -> body, e.g. {'Decisions': '...'}.","title":"Sections","type":"object"},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Session"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"},"slug":{"description":"Latin, date-prefixed episode id / filename, e.g. 2026-07-22-auth-refactor.","title":"Slug","type":"string"},"span":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"When the work happened, YYYY-MM-DD or A..B; defaults to date. On amend without an explicit date, defaults to the existing episode's own span instead (#170).","title":"Span"},"sync":{"default":true,"description":"Fetch + fast-forward the shelf to its remote before anything is written (#108): a dirty tracked tree or a diverged branch refuses the shelve with the fix in the message instead of silently writing onto a stale base. A failed fetch (offline) does not refuse — it is reported loudly.","title":"Sync","type":"boolean"},"tags":{"items":{"type":"string"},"title":"Tags","type":"array"}},"required":["slug","kind","digest"],"title":"ShelveInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/ShelveInput"}},"required":["params"],"title":"memshelf_shelveArguments","type":"object"},"name":"memshelf_shelve","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_shelveOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Check a digest against the contract, writing nothing"},"description":"Check a digest against the contract while it is still being written —\nthe same validator `memshelf_shelve` runs, writing nothing. `strict` turns\nwarnings into failures.","inputSchema":{"$defs":{"LintDigestInput":{"additionalProperties":false,"properties":{"digest":{"description":"The digest text to check. Nothing is written.","title":"Digest","type":"string"},"strict":{"default":false,"description":"Make warnings count as failure. Off by default: a reference digest legitimately carries no decision marker, so `thin` must not block by default.","title":"Strict","type":"boolean"}},"required":["digest"],"title":"LintDigestInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/LintDigestInput"}},"required":["params"],"title":"memshelf_lint_digestArguments","type":"object"},"name":"memshelf_lint_digest","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_lint_digestOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Recall an episode or one of its sections"},"description":"Fetch a shelved episode by id, or one `## Section` of it, as a data\nenvelope. Prefer the section when it answers the question.","inputSchema":{"$defs":{"RecallInput":{"additionalProperties":false,"properties":{"episode_id":{"description":"Episode id / slug, e.g. 2026-07-22-auth-refactor.","title":"Episode Id","type":"string"},"log":{"default":true,"description":"Append this recall to recall-log.tsv (feeds realized-economy stats). On by default (#112): without the counter there is no way to know whether the reading habit ever took; pass false to read without a trace.","title":"Log","type":"boolean"},"max_bytes":{"default":100000,"title":"Max Bytes","type":"integer"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Optional H2 section to fetch alone, e.g. 'Decisions'.","title":"Section"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"required":["episode_id"],"title":"RecallInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/RecallInput"}},"required":["params"],"title":"memshelf_recallArguments","type":"object"},"name":"memshelf_recall","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_recallOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Read the shelf INDEX"},"description":"Return the shelf INDEX — the small recall entry point. Read it before\nanswering anything about past work, then recall only what you need.","inputSchema":{"$defs":{"IndexInput":{"additionalProperties":false,"description":"Nothing beyond the shelf: INDEX is small and read whole.","properties":{"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"IndexInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/IndexInput"}},"required":["params"],"title":"memshelf_indexArguments","type":"object"},"name":"memshelf_index","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_indexOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Search the shelf"},"description":"Grep the shelf for episodes matching every query token; returns\naddresses and snippets. Use when the episode id is unknown.","inputSchema":{"$defs":{"SearchInput":{"additionalProperties":false,"properties":{"max_results":{"default":10,"title":"Max Results","type":"integer"},"query":{"description":"Space-separated tokens; a hit must contain all of them.","title":"Query","type":"string"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"required":["query"],"title":"SearchInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/SearchInput"}},"required":["params"],"title":"memshelf_searchArguments","type":"object"},"name":"memshelf_search","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_searchOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Token accounting for the shelf"},"description":"Report the shelf's token economy: standing cost vs shelved mass, claimed\ncompression, realized savings from logged recalls.","inputSchema":{"$defs":{"StatsInput":{"additionalProperties":false,"description":"Beyond the shelf, only the bound on one episode's claim.","properties":{"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Context window in tokens, used as the per-episode cap on claimed mass (#110). Optional: falls back to $MEMSHELF_CONTEXT_WINDOW, then to 200,000 — the standard window of the clients this shelf is written for. Pass your client's real window if it is larger.","title":"Context Window"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"StatsInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/StatsInput"}},"required":["params"],"title":"memshelf_statsArguments","type":"object"},"name":"memshelf_stats","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_statsOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Where did my context window go?"},"description":"Report what your context window is made of and what you could put down\n— breakdown plus ranked proposals; writes nothing. Pass your window's\noccupants (label, size, live or not); with none it reports the shelf alone.","inputSchema":{"$defs":{"AdviseInput":{"additionalProperties":false,"properties":{"budget_tokens":{"default":200000,"description":"Your context window. Default is a common size, not a memshelf constant.","title":"Budget Tokens","type":"integer"},"include_memory_overhead":{"default":true,"description":"Count memshelf's own standing cost (INDEX + digests) as an occupant.","title":"Include Memory Overhead","type":"boolean"},"occupants":{"description":"What is in your context right now. Empty is valid — you then get the shelf side only, and the report says the window side is missing.","items":{"$ref":"#/$defs/OccupantInput"},"title":"Occupants","type":"array"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"},"stale_after_turns":{"default":10,"description":"Turns of silence after which an occupant of unstated state is called stale.","title":"Stale After Turns","type":"integer"}},"title":"AdviseInput","type":"object"},"OccupantInput":{"additionalProperties":false,"description":"One thing the caller reports as sitting in its context window.","properties":{"approx_tokens":{"description":"Rough size in tokens; an eyeball estimate is fine.","title":"Approx Tokens","type":"integer"},"episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Set if you believe this is ALREADY shelved. The claim is verified against the shelf before anything is proposed.","title":"Episode Id"},"idle_turns":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Turns since this was last referenced, if you can tell.","title":"Idle Turns"},"kind":{"default":"topic","enum":["topic","research","tool-output","instructions","other"],"title":"Kind","type":"string"},"label":{"description":"What this is, in your own words — it is echoed in proposals.","title":"Label","type":"string"},"state":{"default":"unknown","description":"Is the topic still in play? Only you can tell. Unstated counts as live.","enum":["live","closed","unknown"],"title":"State","type":"string"}},"required":["label","approx_tokens"],"title":"OccupantInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/AdviseInput"}},"required":["params"],"title":"memshelf_adviseArguments","type":"object"},"name":"memshelf_advise","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_adviseOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Bootstrap a memory shelf"},"description":"Create (or top up) a memory shelf: layout, categories, INDEX preamble,\nPOLICY.md, shelf.yml. Idempotent; never overwrites existing files.","inputSchema":{"$defs":{"InitInput":{"additionalProperties":false,"properties":{"name":{"default":"Memory shelf","title":"Name","type":"string"},"remote":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Remote URL; only with storage=git-remote (private repos only).","title":"Remote"},"shelf_path":{"default":"","description":"Directory to create (or top up) the shelf in. Optional: when omitted, $MEMSHELF_SHELF_PATH is used.","title":"Shelf Path","type":"string"},"storage":{"default":"git-local","enum":["plain","git-local","git-remote"],"title":"Storage","type":"string"}},"title":"InitInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/InitInput"}},"required":["params"],"title":"memshelf_initArguments","type":"object"},"name":"memshelf_init","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_initOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Regenerate the shelf's derived files from its episodes"},"description":"Regenerate the derived files (ledger.tsv, .meta.json, INDEX.md,\nstats.svg) from the episodes; `check=true` only reports drift. Hand-run it\nonly on a shelf whose bot is not rendering.","inputSchema":{"$defs":{"RebuildInput":{"additionalProperties":false,"properties":{"adopt":{"default":false,"description":"One-shot migration for a shelf written before #58: copy the shelve date, ledger notes and display title out of ledger.tsv/.meta.json into each episode's frontmatter, so regenerating cannot drop them.","title":"Adopt","type":"boolean"},"check":{"default":false,"description":"Verify instead of write: report which derived files would change and exit non-zero if any would. The shelf's PR guard runs this.","title":"Check","type":"boolean"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"RebuildInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/RebuildInput"}},"required":["params"],"title":"memshelf_rebuildArguments","type":"object"},"name":"memshelf_rebuild","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_rebuildOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Collapse a period into one digest-of-digests"},"description":"Archive a period's episodes behind one digest-of-digests you write,\nshrinking INDEX; nothing is deleted. Not the answer to `index-bloat`.","inputSchema":{"$defs":{"RollupInput":{"additionalProperties":false,"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Rollup date (default: today).","title":"Date"},"digest":{"description":"The digest-of-digests — YOUR synthesis of the period, not the tool's. Same contract as a shelve digest: what was decided, what was rejected, what stays open.","title":"Digest","type":"string"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Free-form INDEX title.","title":"Display Title"},"episode_ids":{"description":"Explicit episode ids to archive instead of a date range.","items":{"type":"string"},"title":"Episode Ids","type":"array"},"sections":{"additionalProperties":{"type":"string"},"description":"Extra H2 sections for the rollup episode.","title":"Sections","type":"object"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"},"slug":{"description":"Latin slug/id of the rollup episode, e.g. 2026-Q2-rollup.","title":"Slug","type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Archive every episode dated on or before this ISO date.","title":"Until"}},"required":["slug","digest"],"title":"RollupInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/RollupInput"}},"required":["params"],"title":"memshelf_rollupArguments","type":"object"},"name":"memshelf_rollup","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_rollupOutput","type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete episodes past their retain_until"},"description":"Drop episodes past `retain_until`, then reindex. Dry run unless\n`apply=true`; removes working-tree files only, git history keeps them.","inputSchema":{"$defs":{"PurgeInput":{"additionalProperties":false,"properties":{"apply":{"default":false,"description":"Actually delete. Default is a dry run that only lists what expired.","title":"Apply","type":"boolean"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"},"today":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Treat this ISO date as today (testing/backdating).","title":"Today"}},"title":"PurgeInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/PurgeInput"}},"required":["params"],"title":"memshelf_purgeArguments","type":"object"},"name":"memshelf_purge","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_purgeOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Resolve multi-writer shelf conflicts"},"description":"Settle the two-writers-on-parallel-branches conflict: union derived\nrows, rebuild INDEX, run doctor. Episode conflicts are reported, never\nauto-merged; safe outside a conflict too.","inputSchema":{"$defs":{"ResolveInput":{"additionalProperties":false,"properties":{"commit":{"default":false,"description":"Commit the resolution (inside a merge this completes the merge with git's prepared message). Default: leave changes staged.","title":"Commit","type":"boolean"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"ResolveInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/ResolveInput"}},"required":["params"],"title":"memshelf_resolveArguments","type":"object"},"name":"memshelf_resolve","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_resolveOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Fast-forward the shelf clone to its remote"},"description":"Fetch and fast-forward the shelf clone to its remote, writing nothing\nelse — for a clone behind the bot's render or another session's shelve.\nRefuses on a dirty tree or a diverged branch, with the fix.","inputSchema":{"$defs":{"SyncInput":{"additionalProperties":false,"properties":{"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"SyncInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/SyncInput"}},"required":["params"],"title":"memshelf_syncArguments","type":"object"},"name":"memshelf_sync","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_syncOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Check shelf integrity"},"description":"Diagnose shelf integrity: episode schema, digest contract at rest,\nleaked secrets, ledger consistency, INDEX budget. Read-only; fixes\nnothing. `check_remote` adds the network probe for a public remote.","inputSchema":{"$defs":{"DoctorInput":{"additionalProperties":false,"properties":{"check_remote":{"default":false,"description":"Also probe git remotes and fail the shelf if any is publicly visible (MANIFEST principle 8). Off by default because it hits the network.","title":"Check Remote","type":"boolean"},"derived_stale_after_hours":{"default":24,"description":"Hours the derived layer may go unrewritten with uncounted episodes before `derived-stale` fires (#89). A shelf picks its own threshold — a bot that renders in minutes deserves a far shorter one than the day-long default.","exclusiveMinimum":0,"title":"Derived Stale After Hours","type":"number"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"DoctorInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/DoctorInput"}},"required":["params"],"title":"memshelf_doctorArguments","type":"object"},"name":"memshelf_doctor","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_doctorOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Import an exported transcript for shelving"},"description":"Retro-shelve an exported dialog without pulling it through context:\n`discover` lists conversations by content markers, `extract` writes one\ncleaned conversation to a working file for segmenting and shelving.","inputSchema":{"$defs":{"ImportInput":{"additionalProperties":false,"properties":{"format":{"default":"auto","enum":["auto","claude-json","claude-code-jsonl"],"title":"Format","type":"string"},"limit":{"default":50,"description":"discover: max conversations to return.","title":"Limit","type":"integer"},"markers":{"description":"Content substrings that must ALL appear in a conversation's body (discovery is by content, not title).","items":{"type":"string"},"title":"Markers","type":"array"},"method":{"description":"'discover' lists conversations by content marker; 'extract' cleans one to a working file for shelving.","enum":["discover","extract"],"title":"Method","type":"string"},"out":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"extract: output file for the cleaned transcript (default: a temp working file). Never write it inside a shelf.","title":"Out"},"path":{"description":"Path to the transcript FILE — content never rides in-context.","title":"Path","type":"string"},"select":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"extract: conversation id / title / index to clean.","title":"Select"}},"required":["method","path"],"title":"ImportInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/ImportInput"}},"required":["params"],"title":"memshelf_importArguments","type":"object"},"name":"memshelf_import","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_importOutput","type":"object"}}],"ttlMs":0}}}
{"at":"2026-11-23T03:14:15.662Z","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:14:16.625Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"instructions":"memshelf-mcp 0.4.0: served code 09a0de8d8da3 at /opt/server/tools/memshelf-mcp/lib/python3.13/site-packages/memshelf_mcp; served-code freshness is UNKNOWN — no shelf named on this call or in $MEMSHELF_SHELF_PATH, and $MEMSHELF_CHECKOUT unset. To make it known, clone memshelf-mcp next to the shelf or set MEMSHELF_CHECKOUT=/path/to/memshelf-mcp/src/memshelf_mcp; `memshelf_doctor` reports the same state as `freshness-unknown`.","protocolVersion":"2025-11-25","serverInfo":{"name":"memshelf_mcp","version":"0.4.0"}}}}
{"at":"2026-11-23T03:14:16.625Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:14:16.625Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:14:16.627Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Shelve an episode to the memory shelf"},"description":"Offload one closed topic to the shelf as a durable, indexed episode —\nredaction, digest contract and git commit included. Derived files are not\nwritten here — they are rendered by `memshelf_rebuild` or the shelf's bot.\nDetails: docs/tools.md.","inputSchema":{"$defs":{"ShelveInput":{"additionalProperties":false,"properties":{"amend":{"default":false,"description":"Rewrite an episode already on the shelf, under the same slug (#71): one episode, one recomputed ledger row, redaction and the digest contract re-run. Errors if the slug is not there — that is a typo, not a create.","title":"Amend","type":"boolean"},"approx_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Rough in-window size in tokens; an eyeball estimate is fine. OMIT when nothing was measured or estimated — the episode is then recorded as approx_tokens_source: unmeasured instead of a silent 0 (#113): absence of measurement must not look like a measured zero.","title":"Approx Tokens"},"approx_tokens_source":{"anyOf":[{"enum":["estimate","measured"],"type":"string"},{"type":"null"}],"default":null,"description":"Where the number came from (#79). Default for any passed number is 'estimate' — that is what callers actually produce; say 'measured' only when it was. Contradiction (a source with no number) is refused.","title":"Approx Tokens Source"},"autocommit":{"default":true,"title":"Autocommit","type":"boolean"},"await_render_s":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"After a push: seconds to wait for the shelf bot's render and fast-forward onto it, so the clone ends level with the remote (#157). Omit for the default — wait (60 s) only when the shelf has the shelf-derived bot and the push left derived files out of date; 0 = never.","title":"Await Render S"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"YYYY-MM-DD; always wins. Omitted: amend keeps the existing episode's own date, a new dated slug takes it from its YYYY-MM-DD- prefix, and only an undated slug falls back to today (#170).","title":"Date"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"digest":{"description":"The <=120-word digest; validated before any write.","title":"Digest","type":"string"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Free-form INDEX title; defaults to the slug.","title":"Display Title"},"kind":{"enum":["topic","research","session"],"title":"Kind","type":"string"},"mode":{"default":"live","enum":["live","import"],"title":"Mode","type":"string"},"notes":{"default":"","title":"Notes","type":"string"},"publish":{"default":false,"description":"Publish the shelve commit to origin as a NEW branch shelve/<slug> and report a one-click compare link (#118) — the mode for shelves whose main requires a PR. Exclusive with `push`; the local checkout never switches branches, so recall keeps working from this clone.","title":"Publish","type":"boolean"},"push":{"default":false,"description":"Push the shelve commit; on a rejection, rebase and retry exactly once (#108). The result then carries the post-push sha — the only sha worth quoting, since a rebase rewrites the local one.","title":"Push","type":"boolean"},"retain_until":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Retention (#15): ISO date after which `memshelf purge` drops this episode. Absent means keep — retention is opt-in per episode.","title":"Retain Until"},"sections":{"additionalProperties":{"type":"string"},"description":"H2 heading -> body, e.g. {'Decisions': '...'}.","title":"Sections","type":"object"},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Session"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"},"slug":{"description":"Latin, date-prefixed episode id / filename, e.g. 2026-07-22-auth-refactor.","title":"Slug","type":"string"},"span":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"When the work happened, YYYY-MM-DD or A..B; defaults to date. On amend without an explicit date, defaults to the existing episode's own span instead (#170).","title":"Span"},"sync":{"default":true,"description":"Fetch + fast-forward the shelf to its remote before anything is written (#108): a dirty tracked tree or a diverged branch refuses the shelve with the fix in the message instead of silently writing onto a stale base. A failed fetch (offline) does not refuse — it is reported loudly.","title":"Sync","type":"boolean"},"tags":{"items":{"type":"string"},"title":"Tags","type":"array"}},"required":["slug","kind","digest"],"title":"ShelveInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/ShelveInput"}},"required":["params"],"title":"memshelf_shelveArguments","type":"object"},"name":"memshelf_shelve","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_shelveOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Check a digest against the contract, writing nothing"},"description":"Check a digest against the contract while it is still being written —\nthe same validator `memshelf_shelve` runs, writing nothing. `strict` turns\nwarnings into failures.","inputSchema":{"$defs":{"LintDigestInput":{"additionalProperties":false,"properties":{"digest":{"description":"The digest text to check. Nothing is written.","title":"Digest","type":"string"},"strict":{"default":false,"description":"Make warnings count as failure. Off by default: a reference digest legitimately carries no decision marker, so `thin` must not block by default.","title":"Strict","type":"boolean"}},"required":["digest"],"title":"LintDigestInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/LintDigestInput"}},"required":["params"],"title":"memshelf_lint_digestArguments","type":"object"},"name":"memshelf_lint_digest","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_lint_digestOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Recall an episode or one of its sections"},"description":"Fetch a shelved episode by id, or one `## Section` of it, as a data\nenvelope. Prefer the section when it answers the question.","inputSchema":{"$defs":{"RecallInput":{"additionalProperties":false,"properties":{"episode_id":{"description":"Episode id / slug, e.g. 2026-07-22-auth-refactor.","title":"Episode Id","type":"string"},"log":{"default":true,"description":"Append this recall to recall-log.tsv (feeds realized-economy stats). On by default (#112): without the counter there is no way to know whether the reading habit ever took; pass false to read without a trace.","title":"Log","type":"boolean"},"max_bytes":{"default":100000,"title":"Max Bytes","type":"integer"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Optional H2 section to fetch alone, e.g. 'Decisions'.","title":"Section"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"required":["episode_id"],"title":"RecallInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/RecallInput"}},"required":["params"],"title":"memshelf_recallArguments","type":"object"},"name":"memshelf_recall","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_recallOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Read the shelf INDEX"},"description":"Return the shelf INDEX — the small recall entry point. Read it before\nanswering anything about past work, then recall only what you need.","inputSchema":{"$defs":{"IndexInput":{"additionalProperties":false,"description":"Nothing beyond the shelf: INDEX is small and read whole.","properties":{"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"IndexInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/IndexInput"}},"required":["params"],"title":"memshelf_indexArguments","type":"object"},"name":"memshelf_index","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_indexOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Search the shelf"},"description":"Grep the shelf for episodes matching every query token; returns\naddresses and snippets. Use when the episode id is unknown.","inputSchema":{"$defs":{"SearchInput":{"additionalProperties":false,"properties":{"max_results":{"default":10,"title":"Max Results","type":"integer"},"query":{"description":"Space-separated tokens; a hit must contain all of them.","title":"Query","type":"string"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"required":["query"],"title":"SearchInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/SearchInput"}},"required":["params"],"title":"memshelf_searchArguments","type":"object"},"name":"memshelf_search","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_searchOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Token accounting for the shelf"},"description":"Report the shelf's token economy: standing cost vs shelved mass, claimed\ncompression, realized savings from logged recalls.","inputSchema":{"$defs":{"StatsInput":{"additionalProperties":false,"description":"Beyond the shelf, only the bound on one episode's claim.","properties":{"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Context window in tokens, used as the per-episode cap on claimed mass (#110). Optional: falls back to $MEMSHELF_CONTEXT_WINDOW, then to 200,000 — the standard window of the clients this shelf is written for. Pass your client's real window if it is larger.","title":"Context Window"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"StatsInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/StatsInput"}},"required":["params"],"title":"memshelf_statsArguments","type":"object"},"name":"memshelf_stats","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_statsOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Where did my context window go?"},"description":"Report what your context window is made of and what you could put down\n— breakdown plus ranked proposals; writes nothing. Pass your window's\noccupants (label, size, live or not); with none it reports the shelf alone.","inputSchema":{"$defs":{"AdviseInput":{"additionalProperties":false,"properties":{"budget_tokens":{"default":200000,"description":"Your context window. Default is a common size, not a memshelf constant.","title":"Budget Tokens","type":"integer"},"include_memory_overhead":{"default":true,"description":"Count memshelf's own standing cost (INDEX + digests) as an occupant.","title":"Include Memory Overhead","type":"boolean"},"occupants":{"description":"What is in your context right now. Empty is valid — you then get the shelf side only, and the report says the window side is missing.","items":{"$ref":"#/$defs/OccupantInput"},"title":"Occupants","type":"array"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"},"stale_after_turns":{"default":10,"description":"Turns of silence after which an occupant of unstated state is called stale.","title":"Stale After Turns","type":"integer"}},"title":"AdviseInput","type":"object"},"OccupantInput":{"additionalProperties":false,"description":"One thing the caller reports as sitting in its context window.","properties":{"approx_tokens":{"description":"Rough size in tokens; an eyeball estimate is fine.","title":"Approx Tokens","type":"integer"},"episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Set if you believe this is ALREADY shelved. The claim is verified against the shelf before anything is proposed.","title":"Episode Id"},"idle_turns":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Turns since this was last referenced, if you can tell.","title":"Idle Turns"},"kind":{"default":"topic","enum":["topic","research","tool-output","instructions","other"],"title":"Kind","type":"string"},"label":{"description":"What this is, in your own words — it is echoed in proposals.","title":"Label","type":"string"},"state":{"default":"unknown","description":"Is the topic still in play? Only you can tell. Unstated counts as live.","enum":["live","closed","unknown"],"title":"State","type":"string"}},"required":["label","approx_tokens"],"title":"OccupantInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/AdviseInput"}},"required":["params"],"title":"memshelf_adviseArguments","type":"object"},"name":"memshelf_advise","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_adviseOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Bootstrap a memory shelf"},"description":"Create (or top up) a memory shelf: layout, categories, INDEX preamble,\nPOLICY.md, shelf.yml. Idempotent; never overwrites existing files.","inputSchema":{"$defs":{"InitInput":{"additionalProperties":false,"properties":{"name":{"default":"Memory shelf","title":"Name","type":"string"},"remote":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Remote URL; only with storage=git-remote (private repos only).","title":"Remote"},"shelf_path":{"default":"","description":"Directory to create (or top up) the shelf in. Optional: when omitted, $MEMSHELF_SHELF_PATH is used.","title":"Shelf Path","type":"string"},"storage":{"default":"git-local","enum":["plain","git-local","git-remote"],"title":"Storage","type":"string"}},"title":"InitInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/InitInput"}},"required":["params"],"title":"memshelf_initArguments","type":"object"},"name":"memshelf_init","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_initOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Regenerate the shelf's derived files from its episodes"},"description":"Regenerate the derived files (ledger.tsv, .meta.json, INDEX.md,\nstats.svg) from the episodes; `check=true` only reports drift. Hand-run it\nonly on a shelf whose bot is not rendering.","inputSchema":{"$defs":{"RebuildInput":{"additionalProperties":false,"properties":{"adopt":{"default":false,"description":"One-shot migration for a shelf written before #58: copy the shelve date, ledger notes and display title out of ledger.tsv/.meta.json into each episode's frontmatter, so regenerating cannot drop them.","title":"Adopt","type":"boolean"},"check":{"default":false,"description":"Verify instead of write: report which derived files would change and exit non-zero if any would. The shelf's PR guard runs this.","title":"Check","type":"boolean"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"RebuildInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/RebuildInput"}},"required":["params"],"title":"memshelf_rebuildArguments","type":"object"},"name":"memshelf_rebuild","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_rebuildOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Collapse a period into one digest-of-digests"},"description":"Archive a period's episodes behind one digest-of-digests you write,\nshrinking INDEX; nothing is deleted. Not the answer to `index-bloat`.","inputSchema":{"$defs":{"RollupInput":{"additionalProperties":false,"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Rollup date (default: today).","title":"Date"},"digest":{"description":"The digest-of-digests — YOUR synthesis of the period, not the tool's. Same contract as a shelve digest: what was decided, what was rejected, what stays open.","title":"Digest","type":"string"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Free-form INDEX title.","title":"Display Title"},"episode_ids":{"description":"Explicit episode ids to archive instead of a date range.","items":{"type":"string"},"title":"Episode Ids","type":"array"},"sections":{"additionalProperties":{"type":"string"},"description":"Extra H2 sections for the rollup episode.","title":"Sections","type":"object"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"},"slug":{"description":"Latin slug/id of the rollup episode, e.g. 2026-Q2-rollup.","title":"Slug","type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Archive every episode dated on or before this ISO date.","title":"Until"}},"required":["slug","digest"],"title":"RollupInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/RollupInput"}},"required":["params"],"title":"memshelf_rollupArguments","type":"object"},"name":"memshelf_rollup","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_rollupOutput","type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete episodes past their retain_until"},"description":"Drop episodes past `retain_until`, then reindex. Dry run unless\n`apply=true`; removes working-tree files only, git history keeps them.","inputSchema":{"$defs":{"PurgeInput":{"additionalProperties":false,"properties":{"apply":{"default":false,"description":"Actually delete. Default is a dry run that only lists what expired.","title":"Apply","type":"boolean"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"},"today":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Treat this ISO date as today (testing/backdating).","title":"Today"}},"title":"PurgeInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/PurgeInput"}},"required":["params"],"title":"memshelf_purgeArguments","type":"object"},"name":"memshelf_purge","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_purgeOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Resolve multi-writer shelf conflicts"},"description":"Settle the two-writers-on-parallel-branches conflict: union derived\nrows, rebuild INDEX, run doctor. Episode conflicts are reported, never\nauto-merged; safe outside a conflict too.","inputSchema":{"$defs":{"ResolveInput":{"additionalProperties":false,"properties":{"commit":{"default":false,"description":"Commit the resolution (inside a merge this completes the merge with git's prepared message). Default: leave changes staged.","title":"Commit","type":"boolean"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"ResolveInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/ResolveInput"}},"required":["params"],"title":"memshelf_resolveArguments","type":"object"},"name":"memshelf_resolve","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_resolveOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Fast-forward the shelf clone to its remote"},"description":"Fetch and fast-forward the shelf clone to its remote, writing nothing\nelse — for a clone behind the bot's render or another session's shelve.\nRefuses on a dirty tree or a diverged branch, with the fix.","inputSchema":{"$defs":{"SyncInput":{"additionalProperties":false,"properties":{"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"SyncInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/SyncInput"}},"required":["params"],"title":"memshelf_syncArguments","type":"object"},"name":"memshelf_sync","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_syncOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Check shelf integrity"},"description":"Diagnose shelf integrity: episode schema, digest contract at rest,\nleaked secrets, ledger consistency, INDEX budget. Read-only; fixes\nnothing. `check_remote` adds the network probe for a public remote.","inputSchema":{"$defs":{"DoctorInput":{"additionalProperties":false,"properties":{"check_remote":{"default":false,"description":"Also probe git remotes and fail the shelf if any is publicly visible (MANIFEST principle 8). Off by default because it hits the network.","title":"Check Remote","type":"boolean"},"derived_stale_after_hours":{"default":24,"description":"Hours the derived layer may go unrewritten with uncounted episodes before `derived-stale` fires (#89). A shelf picks its own threshold — a bot that renders in minutes deserves a far shorter one than the day-long default.","exclusiveMinimum":0,"title":"Derived Stale After Hours","type":"number"},"shelf_path":{"default":"","description":"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default.","title":"Shelf Path","type":"string"}},"title":"DoctorInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/DoctorInput"}},"required":["params"],"title":"memshelf_doctorArguments","type":"object"},"name":"memshelf_doctor","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_doctorOutput","type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Import an exported transcript for shelving"},"description":"Retro-shelve an exported dialog without pulling it through context:\n`discover` lists conversations by content markers, `extract` writes one\ncleaned conversation to a working file for segmenting and shelving.","inputSchema":{"$defs":{"ImportInput":{"additionalProperties":false,"properties":{"format":{"default":"auto","enum":["auto","claude-json","claude-code-jsonl"],"title":"Format","type":"string"},"limit":{"default":50,"description":"discover: max conversations to return.","title":"Limit","type":"integer"},"markers":{"description":"Content substrings that must ALL appear in a conversation's body (discovery is by content, not title).","items":{"type":"string"},"title":"Markers","type":"array"},"method":{"description":"'discover' lists conversations by content marker; 'extract' cleans one to a working file for shelving.","enum":["discover","extract"],"title":"Method","type":"string"},"out":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"extract: output file for the cleaned transcript (default: a temp working file). Never write it inside a shelf.","title":"Out"},"path":{"description":"Path to the transcript FILE — content never rides in-context.","title":"Path","type":"string"},"select":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"extract: conversation id / title / index to clean.","title":"Select"}},"required":["method","path"],"title":"ImportInput","type":"object"}},"properties":{"params":{"$ref":"#/$defs/ImportInput"}},"required":["params"],"title":"memshelf_importArguments","type":"object"},"name":"memshelf_import","outputSchema":{"properties":{"result":{"title":"Result","type":"string"}},"required":["result"],"title":"memshelf_importOutput","type":"object"}}]}}}
