Serveur MCP

trip2g

io.github.trip2g/trip2g

Ce que fait ce MCP

Searches Markdown-based and federated knowledge bases, retrieves note sections, expands tables of contents, and finds similar notes.

expand
Walk a note's table of contents level by level (progressive disclosure). Canonical call: expand(path=<result.note_path>, toc_path=[...]) — copy path verbatim from a search result's note_path field. Returns the direct children of a TOC node: omit toc_path (or pass []) for the top-level sections, or pass a toc_path to list that section's subsections. Each child has title, level, path, and has_children. A section with subsections lists them; a section without subsections is returned in full (what note_html gives for that toc_path, plus section_html in the payload), so no second call is needed to read a leaf. This cannot be turned off, and a client that wants only structure never triggers it: has_children on each listed child says where descending would turn into reading.
Schéma d’entrée
{'type': 'object', 'properties': {'pid': {'type': 'number', 'description': "Non-negative integer (uint64) note id, copied verbatim from a search result's note_id field. Not a path, slug, or match_id. Prefer path"}, 'href': {'type': 'string', 'description': "String note href, copied verbatim from a search result's href field"}, 'last': {'type': 'number', 'items': {'type': 'string'}, 'description': 'List only this many of the newest subsections instead of all of them. A note that gains a dated section a day has hundreds of them after a year, and reading the whole listing to reach the latest few is the cost this avoids. The summary, total_children and omitted say what was left out, so a bounded listing never reads as a complete one. Bounds that meet or overlap return everything rather than repeating a run.'}, 'path': {'type': 'string', 'description': 'String note path, e.g. "concepts/maska-i-glubina.md" — copy verbatim from a search result\'s note_path field. The default, preferred way to reference a note'}, 'first': {'type': 'number', 'description': 'List only this many of the oldest subsections. Pair it with last to get how a subject started and where it stands now, leaving out the middle; the summary marks the gap where it falls.'}, 'note_id': {'type': 'number', 'description': "Same as pid: non-negative integer (uint64) note id, copied verbatim from a search result's note_id field. Not a path, slug, or match_id. Prefer path"}, 'toc_path': {'type': 'array', 'description': 'Breadcrumb path to the node to expand, e.g. ["Chapter 1"]. Omit or [] for the top level.'}}}
federated_expand
Walk a remote note's table of contents level by level inside a connected knowledge base (progressive disclosure), same as expand. Canonical call: federated_expand(kb_id=..., path=<result.note_path>, toc_path=[...]). Omit toc_path for the top level, or pass a toc_path to list that node's subsections. A section with subsections lists them; a section without subsections is returned in full, as federated_note_html would return it — has_children on each listed child says where that happens.
Schéma d’entrée
{'type': 'object', 'required': ['kb_id'], 'properties': {'pid': {'type': 'number', 'description': "Non-negative integer (uint64) remote note id, copied verbatim from a federated_search result's note_id field. Prefer path"}, 'href': {'type': 'string', 'description': "String remote note href, copied verbatim from a federated_search result's href field"}, 'last': {'type': 'number', 'description': 'List only this many of the newest subsections instead of all of them, as expand does. The summary, total_children and omitted say what was left out.'}, 'path': {'type': 'string', 'description': "String remote note path, copied verbatim from a federated_search result's note_path field"}, 'first': {'type': 'number', 'description': 'List only this many of the oldest subsections, as expand does.'}, 'kb_id': {'type': 'string', 'description': 'Target knowledge base id; nested bases use \'/\' (e.g. "philosophers/nietzsche" routes through the \'philosophers\' peer, recursively). Federation nests up to 3 levels deep (kb_id path segments); a deeper path is rejected.'}, 'note_id': {'type': 'string', 'description': "Same remote note id as pid, but as a STRING (uint64) — stringify the federated_search result's note_id field. Prefer path"}, 'toc_path': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Breadcrumb path to the node to expand. Omit or [] for the top level.'}}}
federated_instructions
Fetch the instructions/guidance for a federated knowledge base by kb_id (e.g. "philosophers/nietzsche") — read a base's own conventions before searching it. Nested bases are addressed with '/' and the call routes through each peer recursively.
Schéma d’entrée
{'type': 'object', 'required': ['kb_id'], 'properties': {'kb_id': {'type': 'string', 'description': 'Target knowledge base id; nested bases use \'/\' (e.g. "philosophers/nietzsche" routes through the \'philosophers\' peer, recursively)'}}}
federated_note_html
Read a remote note inside a connected knowledge base. Canonical call, copying fields verbatim from a federated_search result: federated_search(kb_id="philosophers/<author>", query) -> federated_note_html(kb_id="philosophers/<author>", path=<result.note_path>) — the standard way to descend into a leaf corpus and read real content there, not hub cards. federated_note_html(kb_id=..., match_id=<match.match_id>) reads just the focused chunk around a hit. Only pass pid/note_id if you already copied that exact id from a result. path is a string like "concepts/x.md"; match_id is "p<pid>:c<chunk>"; a value like ":" or "/hub/goethe.md" is a PATH, not a note_id.
Schéma d’entrée
{'type': 'object', 'required': ['kb_id'], 'properties': {'pid': {'type': 'number', 'description': "Non-negative integer (uint64) remote note id, copied verbatim from a federated_search result's note_id field. Not a path, slug, or match_id. Prefer path or match_id"}, 'href': {'type': 'string', 'description': "String remote note href or absolute URL, copied verbatim from a federated_search result's href field"}, 'path': {'type': 'string', 'description': "String remote note path, copied verbatim from a federated_search result's note_path field"}, 'kb_id': {'type': 'string', 'description': 'Target knowledge base id; nested bases use \'/\' (e.g. "philosophers/nietzsche" routes through the \'philosophers\' peer, recursively). Federation nests up to 3 levels deep (kb_id path segments); a deeper path is rejected.'}, 'note_id': {'type': 'string', 'description': "Same remote note id as pid, but as a STRING (uint64) — stringify the federated_search result's note_id field. Not a path, slug, or match_id. Prefer path or match_id"}, 'match_id': {'type': 'string', 'description': 'String chunk id of the form "p<pid>:c<chunk>", copied verbatim from a remote search match\'s match_id field; alone it is enough to resolve the note'}, 'toc_path': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Breadcrumb path to a specific section, e.g. ["Chapter 1", "Introduction"]. Use toc_path from a federated_search match, or a child path from federated_expand. Wins over match_id when both are given. Without either the whole note comes back.'}}}
federated_search
Search connected knowledge bases. Returns snippets with heading breadcrumbs (title > section > subsection) and a precise toc_path per match, same as search; results also carry an absolute kb_id (string) to use verbatim on follow-up calls. Pass kb_id for one base, kb_ids for selected bases, or omit both to fan out. Nested bases are addressed with '/': kb_id "philosophers/nietzsche" routes through the 'philosophers' peer to the base it federates (recursive), up to 3 levels deep. Canonical call: federated_search(kb_id="philosophers/<author>", query) -> federated_note_html(kb_id="philosophers/<author>", path=<result.note_path>) — the standard way to descend into a leaf corpus and read real content, not hub cards.
Schéma d’entrée
{'type': 'object', 'required': ['query'], 'properties': {'kb_id': {'type': 'string', 'description': 'Target knowledge base id; nested bases use \'/\' (e.g. "philosophers/nietzsche" routes through the \'philosophers\' peer, recursively). Federation nests up to 3 levels deep (kb_id path segments); a deeper path is rejected.'}, 'limit': {'type': 'number', 'description': 'Max number of results to return (default 6)'}, 'query': {'type': 'string', 'description': 'Search query'}, 'kb_ids': {'type': 'array', 'items': {'type': 'string'}, 'description': "Target knowledge base ids; each accepts the same nested 'peer/base' form as kb_id"}, 'detail_limit': {'type': 'number', 'description': 'How many results include full snippet matches; results beyond this are returned as lightweight previews (title, path, score) to save context (default 3)'}}}
federated_similar
Find remote notes similar to a known note reference inside a connected knowledge base. Preferred: path (a federated_search result's note_path field).
Schéma d’entrée
{'type': 'object', 'required': ['kb_id'], 'properties': {'pid': {'type': 'number', 'description': "Non-negative integer (uint64) remote note id, copied verbatim from a federated_search result's note_id field. Prefer path"}, 'href': {'type': 'string', 'description': "String remote note href, copied verbatim from a federated_search result's href field"}, 'path': {'type': 'string', 'description': "String remote note path, copied verbatim from a federated_search result's note_path field"}, 'kb_id': {'type': 'string', 'description': 'Target knowledge base id; nested bases use \'/\' (e.g. "philosophers/nietzsche" routes through the \'philosophers\' peer, recursively). Federation nests up to 3 levels deep (kb_id path segments); a deeper path is rejected.'}, 'limit': {'type': 'number', 'description': 'Max number of results'}, 'note_id': {'type': 'string', 'description': "Same remote note id as pid, but as a STRING (uint64) — stringify the federated_search result's note_id field. Prefer path"}}}
instructions
Full tool reference for the trip2g documentation base
Schéma d’entrée
{'type': 'object'}
note_html
Read a note. Canonical calls, copying fields verbatim from a search result: search(query) -> note_html(path=<result.note_path>) reads the whole note; search(query) -> note_html(match_id=<match.match_id>) reads just the focused chunk around a hit (cheaper, targeted); expand(path=<result.note_path>, toc_path=[...]) -> note_html(path=<result.note_path>, toc_path=[...]) reads one exact section. Only pass pid/note_id if you already copied that exact integer from a result's note_id field — never invent one. path is a string like "concepts/x.md"; match_id is "p<pid>:c<chunk>"; a value like ":" or "/hub/goethe.md" is a PATH, not a note_id.
Schéma d’entrée
{'type': 'object', 'properties': {'pid': {'type': 'number', 'description': 'Non-negative integer (uint64) note id, copied verbatim from a search result\'s note_id field. Not a path, slug, or match_id — a value like ":" or "/hub/goethe.md" is a path, not a note id. Prefer path or match_id'}, 'href': {'type': 'string', 'description': "String note href or absolute URL, copied verbatim from a search result's href field"}, 'path': {'type': 'string', 'description': 'String note path, e.g. "concepts/maska-i-glubina.md" — copy verbatim from a search result\'s note_path field. The default, preferred way to open a note'}, 'note_id': {'type': 'number', 'description': "Same as pid: non-negative integer (uint64) note id, copied verbatim from a search result's note_id field. Not a path, slug, or match_id. Prefer path or match_id"}, 'match_id': {'type': 'string', 'description': 'String chunk id of the form "p<pid>:c<chunk>" (e.g. "p32:c4"), copied verbatim from a search match\'s match_id field. Alone it is enough to resolve the note and reads a focused window around that hit'}, 'toc_path': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Breadcrumb path to a specific section, e.g. ["Chapter 1", "Introduction"]. Use toc_path from a search match, or a child path from expand. Wins over match_id when both are given: match_id is only used when toc_path is absent.'}, 'context_words': {'type': 'number', 'description': 'Optional future hint for expanding focused reads'}}}
search
Search notes by query. Returns snippets with a heading breadcrumb (title > section > subsection) that locates the approximate section, plus a precise toc_path per match. Each result carries note_path (string) and note_id (integer); each match carries match_id (string, form "p<pid>:c<chunk>"). Drill-down workflow: 1) search to find the approximate section via the breadcrumb; 2) call note_html(path=<result.note_path>, toc_path=[...]) to read the matched section, or expand(path=<result.note_path>, toc_path=[...]) to navigate the note's structure level by level; 3) note_html(path=<result.note_path>, match_id=<match.match_id>) for a focused chunk window. Each match also carries section_url — a link straight to that heading, for citing the section rather than the whole note.
Schéma d’entrée
{'type': 'object', 'required': ['query'], 'properties': {'limit': {'type': 'number', 'description': 'Max number of results to return (default 6)'}, 'query': {'type': 'string', 'description': 'Search query'}, 'detail_limit': {'type': 'number', 'description': 'How many results include full snippet matches; results beyond this are returned as lightweight previews (title, path, score) to save context (default 3)'}}}
similar
Find related notes from a known note reference. Preferred: path (a search result's note_path field). Use this after opening a promising note when you need nearby context.
Schéma d’entrée
{'type': 'object', 'properties': {'pid': {'type': 'number', 'description': 'Non-negative integer (uint64) note id, copied verbatim from a search result\'s note_id field. Not a path, slug, or match_id — a value like ":" or "/hub/goethe.md" is a path, not a note id. Prefer path'}, 'href': {'type': 'string', 'description': "String note href, copied verbatim from a search result's href field"}, 'path': {'type': 'string', 'description': 'String note path, e.g. "concepts/maska-i-glubina.md" — copy verbatim from a search result\'s note_path field. The default, preferred way to reference a note'}, 'limit': {'type': 'number', 'description': 'Max number of results (default 10)'}, 'note_id': {'type': 'number', 'description': "Same as pid: non-negative integer (uint64) note id, copied verbatim from a search result's note_id field. Not a path, slug, or match_id. Prefer path"}}}
wiki
Wiki Knowledge Base Instructions
Schéma d’entrée
{'type': 'object'}
Modifié
federated_expand
1 October 2026 02:50
Modifié
expand
1 October 2026 02:50
Ajouté
wiki
17 September 2026 12:52
Ajouté
similar
17 September 2026 12:52
Ajouté
search
17 September 2026 12:52
Ajouté
note_html
17 September 2026 12:52
Ajouté
instructions
17 September 2026 12:52
Ajouté
federated_similar
17 September 2026 12:52
Ajouté
federated_search
17 September 2026 12:52
Ajouté
federated_note_html
17 September 2026 12:52
Ajouté
federated_instructions
17 September 2026 12:52
Ajouté
federated_expand
17 September 2026 12:52
Ajouté
expand
17 September 2026 12:52