mindbase

v0.1.3
io.github.frankchu91/mindbase Checked 4 days ago Published 4 months ago

LLM-maintained personal wiki: cross-references sources, flags contradictions.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_wiki

Full-text search across the user's MindBase wiki — matches page titles, one-liners, and slugs. Returns ranked list with snippets.

ParameterTypeDescription
query *stringSearch query (1+ chars)
limitnumberMax results to return (default 10, max 50)

search_all_projects

Search the user's wiki across EVERY project (not just the current one). Returns ranked matches with their owning project id, suitable for citing as `[[<project>/<slug>]]` cross-project wikilinks. Use this when answering open-ended "have I seen this before" questions or proposing cross-project bridges during ingest.

ParameterTypeDescription
query *stringSearch query (1+ chars). Matches against slug, title, and one-liner.
crossProjectOnlybooleanIf true, exclude results from the current project. Useful when looking only for cross-project bridges.
limitnumberMax results to return (default 10, max 50)

read_wiki_page

Read the full content (markdown body + frontmatter + incoming/outgoing wikilinks) of a wiki page by its slug.

ParameterTypeDescription
slug *stringPage slug (e.g. "rag-architecture")

list_recent

List wiki pages added or updated within the past N days, newest first.

ParameterTypeDescription
daysnumberNumber of days to look back (default 7)
limitnumberMax pages to return (default 20, max 100)

search_in_project

Search the wiki, restricted to pages tagged with a specific project (uses the `project` frontmatter field).

ParameterTypeDescription
project *string
query *string
limitnumber

ask_wiki

Ask a natural-language question against the user's wiki. Performs graph-aware retrieval (search → top hits + their 1-hop wikilinks) and returns a cited answer using the configured LLM. Best tool for "what do I know about X?" questions. The answer text contains [N] citation markers — match each N to the corresponding entry in the citations array and render as a clickable link to mindbase_uri.

ParameterTypeDescription
question *stringThe natural-language question
context_pagesarrayOptional: explicit page slugs to include as context
max_pagesnumberCap on total pages read (default 8, max 20)

ingest_source

Ingest a new source into the wiki: saves the raw text, runs LLM compile to create/update wiki pages, applies cross-linking. Returns a summary of changes.

ParameterTypeDescription
text *string
source_urlstringOptional source URL for attribution
titlestringOptional title; LLM will infer if omitted

ingest_plan

Conversational ingest, step 1 of 2. Reads the source, returns the LLM's narrative takeaways and a structured plan of proposed actions — without writing anything yet. The user reviews the takeaways + plan, decides which actions to approve, and then calls ingest_execute(planId, approvals) to commit the approved subset.

ParameterTypeDescription
raw_idstringRe-plan against an already-ingested raw doc instead of saving new text.
source_urlstringOptional source URL for attribution.
textstringRaw source text to ingest (PDF text, URL extract, paste).
titlestringOptional title; LLM will infer if omitted.

ingest_execute

Conversational ingest, step 2 of 2. Commits the user-approved subset of a plan returned by ingest_plan. `approvals` is a map of action id → boolean; omitted ids default to approved (true). Returns the per-action results plus a summary of what got created / updated.

ParameterTypeDescription
planId *stringPlan id returned by ingest_plan.
approvalsobjectMap of action id → boolean. False rejects that action; omitted ids are approved.

quick_capture

Save content to the inbox for later batch processing (NOT a direct wiki note). Use this for "save this for later, I will categorize it myself in the MindBase UI". To create a wiki note directly, use create_note instead.

ParameterTypeDescription
content *string
tagsarray

save_chat_excerpt

Save a fragment of the current AI conversation as a wiki page. LLM auto-titles it if no suggested_title. Marks `created_via: mcp` for audit.

ParameterTypeDescription
content *string
source_chat_idstring
suggested_titlestring

append_to_page

Append content to a section of an existing wiki page. Creates the section if missing. Refuses to modify human-edited pages unless force: true.

ParameterTypeDescription
content *string
section *stringHeading text (without ##)
slug *string
forcebooleanBypass human_touched guard (default false)

update_note_section

Replace the content under a section heading on an existing page. Refuses to modify human-edited pages unless force: true.

ParameterTypeDescription
new_content *string
section *string
slug *string
forceboolean

tag_note

Add or replace tags on a wiki page. mode: "add" merges with existing tags (default); "replace" overwrites.

ParameterTypeDescription
slug *string
tags *array
modestring

set_visibility

Set the visibility level of a wiki page. "internal" and "pii" pages are excluded from semantic search and Q&A by default.

ParameterTypeDescription
level *string
slug *string

list_chats

List recent chat sessions saved in MindBase, newest first.

ParameterTypeDescription
daysnumber
limitnumber

recall_chat

Search past saved chat conversations by content. Returns matching chats with previews.

ParameterTypeDescription
query *string
limitnumber

get_graph_insights

Compute graph insights for the wiki: top hubs, orphans, broken links, fragmented tag clusters.

find_orphans

List wiki pages with no incoming links (orphans).

run_wiki_health

Run the full Wiki Health pipeline: build graph → generate insights → auto cross-link → L2 lint. Writes _insights.md and applies improvements.

export_subgraph

Export a page + its connected neighbors (up to N hops) as a self-contained markdown bundle.

ParameterTypeDescription
slug *string
depthnumber

generate_daily_brief

Generate a morning brief summarizing recent wiki activity with [N] citations. Default 24h lookback. Does not email — for that use the web UI Settings → Daily Brief → Send Now.

ParameterTypeDescription
include_on_this_daybooleanInclude an "On This Day" section for pages created exactly 1w/1m/1y ago
since_hoursnumberHow many hours back to look for recent pages (default 24, max 168)

add_rss_feed

Subscribe MindBase to a new RSS feed. New entries are auto-fetched every 60 minutes and compiled into wiki pages. Use this when the user says things like "subscribe me to <url>", "follow this blog", "add this to my feeds", or shares a feed URL.

ParameterTypeDescription
url *stringThe RSS/Atom feed URL
projectstringOptional project name to group entries under
tagsarrayTags applied to all entries from this feed

list_feeds

List all RSS feeds the user is subscribed to, with stats (last poll time, items ingested, errors). Use this when the user asks "what feeds am I subscribed to?" or wants to check their RSS subscriptions.

list_review_cards

List spaced-repetition review cards. By default returns cards due now (due_only=true). Use this to conduct an interactive review session: list due cards, present each Q to the user, wait for their answer, call answer_card, repeat.

ParameterTypeDescription
due_onlybooleanIf true, only cards due now (default true)
limitnumberMax cards to return (default 20, max 100)

answer_card

Submit an answer to a review card. Use ratings as: forgot (didn't know), hard (struggled), good (right answer with effort), easy (instant recall). After answering, the card is rescheduled according to SM-2.

ParameterTypeDescription
id *stringThe card ID to answer
rating *stringYour self-assessment: forgot, hard, good, or easy

create_card

Create a new review card manually. Use this when you and the user have just discussed a fact worth remembering long-term, e.g. "add this to my reviews". The card will be scheduled for review immediately.

ParameterTypeDescription
answer *stringA concise answer (1-2 sentences, min 2 chars)
question *stringA specific, answerable question (min 5 chars)
source_slugstringOptional wiki page slug the card relates to
tagsarrayOptional tags

create_note

Create a new wiki note. Use for: capturing a thought, starting a research page, or building a meeting/person/project page from a template. At least one of `title` or `content` is recommended. If `template` is given, it is filled with standard vars (date, time, slug, yesterday_slug, tomorrow_slug, title) plus any custom `variables`. Existing slugs cause an error — use append_to_page or update_note_section to extend.

ParameterTypeDescription
contentstringRaw markdown body. Mutually exclusive with template.
kindstringdefault 'note'. Known: note, daily, meeting, person, project, concept, or custom
projectstring
slugstringOverride auto-derived slug (must match [a-z0-9][a-z0-9_-]*)
tagsarray
templatestringTemplate name (without .md) from ~/mindbase-data/templates/
titlestring
variablesobject

create_daily_note

Open or create the daily note for today (or a specific date). Daily notes follow the slug pattern `daily-YYYY-MM-DD` and are auto-linked to yesterday/tomorrow. Returns the existing page if already created, marking `created: false`.

ParameterTypeDescription
datestringISO date YYYY-MM-DD (default: today server-local)

mindbase_apply_template

Overlay a schema template onto an existing project. Appends template prose to README.md and seeds template-specific sections in context.md. Idempotent — re-running with same template is a no-op marker.

ParameterTypeDescription
templateId *string
projectIdstringProject id; defaults to the current project (config.json)

synthesize_topic

Synthesize what the user's wiki collectively knows about a topic. Returns structured threads with row-level citations, contradictions, and gaps. Cached; pass force_refresh: true to regenerate.

ParameterTypeDescription
topic *stringTopic to synthesize (slug or free text)
force_refreshboolean

get_pulse

Get today's (or a specific date's) wiki pulse: weekly writes, new connections, contradictions, stale notes, SRS due count. Use to give the user a daily situational awareness of their knowledge base.

ParameterTypeDescription
datestringISO date YYYY-MM-DD (default: today)
refreshboolean

find_contradictions

Find self-contradictions in the wiki on a given topic. Returns only contradictions, no full synthesis. Useful when the user wants to reconcile evolving views.

ParameterTypeDescription
topic *string

find_gaps

Find gaps in the wiki's coverage of a topic. Returns LLM-suggested missing pieces (e.g., "you mention X but never document Y").

ParameterTypeDescription
topic *string

mindbase_init_project

Scaffold a new MindBase project with the v2 layout: README.md, context.md, index.yaml, sources/contributors/, sources/research/, sources/raw/, state/, logs/, artifacts/. Idempotent — refuses to overwrite existing project.

ParameterTypeDescription
name *stringProject name (will be slugified to project id)
missionstringOptional one-line project mission
templatestringTemplate: empty | investigation | literature-review | market-research | reading-companion | topic-tracker

mindbase_load_project

Load the README + context + index.yaml for a project (defaults to currentProjectId in config.json). Returns the three file bodies for context injection. Read-only by default; pass persist=true to also update config.json currentProjectId (i.e. switch the active project).

ParameterTypeDescription
persistbooleanIf true, write projectId to config.json as currentProjectId. Default false (read-only). Use true only when the caller intends to switch the active project.
projectIdstringProject id; if omitted, resolves to config.json currentProjectId

mindbase_contribute

Append a contributor entry to the current project. Writes to sources/contributors/<user>/<YYYY-MM-DD>.md (append-only) plus log entry. Route mode forces routing: auto (LLM decides), daily (only contributor file), concept (also flag for /mb:build to extract concept), daily+concept (both).

ParameterTypeDescription
text *stringBody text to contribute
modestringauto | daily | concept | daily+concept
projectIdstringProject id; if omitted, resolves via config.json
userstringContributor username; if omitted, resolves to os.userInfo().username

mindbase_validate_structure

Validate that a project conforms to the v2 layout. Returns list of missing required files/dirs. Used as a precondition guard by /mb:build and /mb:migrate.

ParameterTypeDescription
projectIdstringProject id; defaults to the current project (config.json)

mindbase_append_log

Append a structured entry to logs/<today>.md. Format: ## [YYYY-MM-DD HH:MM] {operation} | {topic} | {details}

ParameterTypeDescription
operation *stringingest | build | lint | research | migrate | export | ...
topic *string
detailsstringOptional details (e.g., "created 4, updated 3")
projectIdstringProject id; defaults to the current project (config.json)

mindbase_gather_sources

List contributor + research files modified since the last build (or since a given ISO date). Returns paths + sizes + mtimes. Used by /mb:build to know what to synthesize.

ParameterTypeDescription
projectIdstringProject id; defaults to the current project (config.json)
sincestringISO date (YYYY-MM-DD); defaults to last context.md mtime

mindbase_atomic_write_context

Write new content into context.md atomically. Steps: (1) snapshot current context.md → state/builder/snapshots/<timestamp>.md, (2) tmpwrite + rename, (3) append log entry. Enforces 400-line cap by truncating overflow to sources/research/<auto>.md.

ParameterTypeDescription
content *stringNew context.md body (full file replacement)
projectIdstringProject id; defaults to the current project (config.json)

mindbase_rebuild_index

Regenerate index.yaml by scanning the project tree. Always overwrites; never partial-merges. Output schema: { project, files, contributors, sources, last_build }.

ParameterTypeDescription
projectIdstringProject id; defaults to the current project (config.json)

mindbase_status

Project dashboard: last build time, line counts, contributor stats, recent operations, file counts. Read-only.

ParameterTypeDescription
projectIdstringProject id; defaults to the current project (config.json)

mindbase_migrate

Migrate one or all projects from legacy wiki/ layout to v2 layout. Snapshots to archive/<projectId>-<unixTs>/ first; idempotent on re-run.

ParameterTypeDescription
allboolean
dryRunbooleanIf true, report what would happen without writing
projectIdstringSpecific project to migrate; omit + set all=true to migrate every project
userstringContributor username for routing legacy notes; defaults to os.userInfo()

mindbase_ingest_file

Ingest a file (PDF, .md, or .txt) into a project: archives the original into sources/raw/<date>/, extracts text locally (pdfjs for PDFs — no API call), writes an .extracted.md sidecar for PDFs, and returns the text. Accepts a local absolute path OR an http(s) URL that points directly at a file (e.g. an arXiv PDF link) — URLs are downloaded first. After calling this, discuss the key takeaways with the user and file a summary via mindbase_contribute.

ParameterTypeDescription
path *stringAbsolute path on disk, or a direct http(s) URL to a PDF/.md/.txt file
projectIdstringProject id; defaults to the current project (config.json)
titlestringOptional human title; defaults to the filename

mindbase_research_save

Save research findings to sources/research/<slug>.md. Appends if file exists; otherwise creates. Always appends a log entry.

ParameterTypeDescription
body *stringMarkdown body
topic *stringHuman-readable topic name; slugified for filename
projectIdstringProject id; defaults to the current project (config.json)
sourcesarrayURLs or citations

mindbase_export

Export a project to a portable artifact. markdown-bundle: copies project tree to artifacts/exports/<projectId>-<timestamp>/. zip-archive: same plus zips (uses `zip` if available).

ParameterTypeDescription
projectIdstringProject id; defaults to the current project (config.json)
targetstringmarkdown-bundle | zip-archive