Documentation
¶
Index ¶
- type Analyze
- func (a *Analyze) FindConnections(ctx context.Context, req *mcp.CallToolRequest, ...) (*mcp.CallToolResult, any, error)
- func (a *Analyze) GraphOverview(ctx context.Context, req *mcp.CallToolRequest, input types.GraphOverviewInput) (*mcp.CallToolResult, any, error)
- func (a *Analyze) KnowledgeGaps(ctx context.Context, req *mcp.CallToolRequest, input types.KnowledgeGapsInput) (*mcp.CallToolResult, any, error)
- func (a *Analyze) ListOrphans(ctx context.Context, req *mcp.CallToolRequest, input types.ListOrphansInput) (*mcp.CallToolResult, any, error)
- func (a *Analyze) TopicClusters(ctx context.Context, req *mcp.CallToolRequest, input types.TopicClustersInput) (*mcp.CallToolResult, any, error)
- type Decision
- func (d *Decision) AnalysisHealth(ctx context.Context, req *mcp.CallToolRequest, input types.AnalysisHealthInput) (*mcp.CallToolResult, any, error)
- func (d *Decision) DecisionCheck(ctx context.Context, req *mcp.CallToolRequest, input types.DecisionCheckInput) (*mcp.CallToolResult, any, error)
- func (d *Decision) DecisionCreate(ctx context.Context, req *mcp.CallToolRequest, input types.DecisionCreateInput) (*mcp.CallToolResult, any, error)
- func (d *Decision) DecisionDefer(ctx context.Context, req *mcp.CallToolRequest, input types.DecisionDeferInput) (*mcp.CallToolResult, any, error)
- func (d *Decision) DecisionResolve(ctx context.Context, req *mcp.CallToolRequest, ...) (*mcp.CallToolResult, any, error)
- type Flashcard
- func (f *Flashcard) FlashcardCreate(ctx context.Context, req *mcp.CallToolRequest, ...) (*mcp.CallToolResult, any, error)
- func (f *Flashcard) FlashcardDue(ctx context.Context, req *mcp.CallToolRequest, input types.FlashcardDueInput) (*mcp.CallToolResult, any, error)
- func (f *Flashcard) FlashcardOverview(ctx context.Context, req *mcp.CallToolRequest, ...) (*mcp.CallToolResult, any, error)
- type Journal
- type Navigate
- func (n *Navigate) GetBlock(ctx context.Context, req *mcp.CallToolRequest, input types.GetBlockInput) (*mcp.CallToolResult, any, error)
- func (n *Navigate) GetLinks(ctx context.Context, req *mcp.CallToolRequest, input types.GetLinksInput) (*mcp.CallToolResult, any, error)
- func (n *Navigate) GetPage(ctx context.Context, req *mcp.CallToolRequest, input types.GetPageInput) (*mcp.CallToolResult, any, error)
- func (n *Navigate) GetReferences(ctx context.Context, req *mcp.CallToolRequest, input types.GetReferencesInput) (*mcp.CallToolResult, any, error)
- func (n *Navigate) ListPages(ctx context.Context, req *mcp.CallToolRequest, input types.ListPagesInput) (*mcp.CallToolResult, any, error)
- func (n *Navigate) Traverse(ctx context.Context, req *mcp.CallToolRequest, input types.TraverseInput) (*mcp.CallToolResult, any, error)
- type Search
- func (s *Search) FindByTag(ctx context.Context, req *mcp.CallToolRequest, input types.FindByTagInput) (*mcp.CallToolResult, any, error)
- func (s *Search) QueryDatalog(ctx context.Context, req *mcp.CallToolRequest, input types.QueryDatalogInput) (*mcp.CallToolResult, any, error)
- func (s *Search) QueryProperties(ctx context.Context, req *mcp.CallToolRequest, ...) (*mcp.CallToolResult, any, error)
- func (s *Search) Search(ctx context.Context, req *mcp.CallToolRequest, input types.SearchInput) (*mcp.CallToolResult, any, error)
- type Whiteboard
- type Write
- func (w *Write) AppendBlocks(ctx context.Context, req *mcp.CallToolRequest, input types.AppendBlocksInput) (*mcp.CallToolResult, any, error)
- func (w *Write) BulkUpdateProperties(ctx context.Context, req *mcp.CallToolRequest, ...) (*mcp.CallToolResult, any, error)
- func (w *Write) CreatePage(ctx context.Context, req *mcp.CallToolRequest, input types.CreatePageInput) (*mcp.CallToolResult, any, error)
- func (w *Write) DeleteBlock(ctx context.Context, req *mcp.CallToolRequest, input types.DeleteBlockInput) (*mcp.CallToolResult, any, error)
- func (w *Write) DeletePage(ctx context.Context, req *mcp.CallToolRequest, input types.DeletePageInput) (*mcp.CallToolResult, any, error)
- func (w *Write) LinkPages(ctx context.Context, req *mcp.CallToolRequest, input types.LinkPagesInput) (*mcp.CallToolResult, any, error)
- func (w *Write) MoveBlock(ctx context.Context, req *mcp.CallToolRequest, input types.MoveBlockInput) (*mcp.CallToolResult, any, error)
- func (w *Write) RenamePage(ctx context.Context, req *mcp.CallToolRequest, input types.RenamePageInput) (*mcp.CallToolResult, any, error)
- func (w *Write) UpdateBlock(ctx context.Context, req *mcp.CallToolRequest, input types.UpdateBlockInput) (*mcp.CallToolResult, any, error)
- func (w *Write) UpsertBlocksRaw(ctx context.Context, req *mcp.CallToolRequest) (*mcp.CallToolResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyze ¶
type Analyze struct {
// contains filtered or unexported fields
}
Analyze implements graph analysis MCP tools.
func NewAnalyze ¶
NewAnalyze creates a new Analyze tool handler with a 30-second graph cache.
func (*Analyze) FindConnections ¶
func (a *Analyze) FindConnections(ctx context.Context, req *mcp.CallToolRequest, input types.FindConnectionsInput) (*mcp.CallToolResult, any, error)
FindConnections finds how two pages are connected in the graph.
func (*Analyze) GraphOverview ¶
func (a *Analyze) GraphOverview(ctx context.Context, req *mcp.CallToolRequest, input types.GraphOverviewInput) (*mcp.CallToolResult, any, error)
GraphOverview returns global graph statistics.
func (*Analyze) KnowledgeGaps ¶
func (a *Analyze) KnowledgeGaps(ctx context.Context, req *mcp.CallToolRequest, input types.KnowledgeGapsInput) (*mcp.CallToolResult, any, error)
KnowledgeGaps finds sparse areas in the knowledge graph.
func (*Analyze) ListOrphans ¶ added in v0.4.0
func (a *Analyze) ListOrphans(ctx context.Context, req *mcp.CallToolRequest, input types.ListOrphansInput) (*mcp.CallToolResult, any, error)
ListOrphans returns the actual orphan page names (not just a count).
func (*Analyze) TopicClusters ¶
func (a *Analyze) TopicClusters(ctx context.Context, req *mcp.CallToolRequest, input types.TopicClustersInput) (*mcp.CallToolResult, any, error)
TopicClusters finds community clusters in the knowledge graph.
type Decision ¶ added in v0.3.0
type Decision struct {
// contains filtered or unexported fields
}
Decision implements decision protocol MCP tools.
func NewDecision ¶ added in v0.3.0
NewDecision creates a new Decision tool handler.
func (*Decision) AnalysisHealth ¶ added in v0.3.0
func (d *Decision) AnalysisHealth(ctx context.Context, req *mcp.CallToolRequest, input types.AnalysisHealthInput) (*mcp.CallToolResult, any, error)
AnalysisHealth audits analysis/strategy pages for graph connectivity.
func (*Decision) DecisionCheck ¶ added in v0.3.0
func (d *Decision) DecisionCheck(ctx context.Context, req *mcp.CallToolRequest, input types.DecisionCheckInput) (*mcp.CallToolResult, any, error)
DecisionCheck surfaces all decisions, highlighting overdue ones.
func (*Decision) DecisionCreate ¶ added in v0.3.0
func (d *Decision) DecisionCreate(ctx context.Context, req *mcp.CallToolRequest, input types.DecisionCreateInput) (*mcp.CallToolResult, any, error)
DecisionCreate creates a new DECIDE block with #decision tag and deadline.
func (*Decision) DecisionDefer ¶ added in v0.3.0
func (d *Decision) DecisionDefer(ctx context.Context, req *mcp.CallToolRequest, input types.DecisionDeferInput) (*mcp.CallToolResult, any, error)
DecisionDefer pushes a deadline with a reason and increments defer count.
func (*Decision) DecisionResolve ¶ added in v0.3.0
func (d *Decision) DecisionResolve(ctx context.Context, req *mcp.CallToolRequest, input types.DecisionResolveInput) (*mcp.CallToolResult, any, error)
DecisionResolve marks a decision as DONE with resolution date and outcome.
type Flashcard ¶
type Flashcard struct {
// contains filtered or unexported fields
}
Flashcard implements flashcard/SRS MCP tools.
func NewFlashcard ¶
NewFlashcard creates a new Flashcard tool handler.
func (*Flashcard) FlashcardCreate ¶
func (f *Flashcard) FlashcardCreate(ctx context.Context, req *mcp.CallToolRequest, input types.FlashcardCreateInput) (*mcp.CallToolResult, any, error)
FlashcardCreate creates a new flashcard (block with #card tag and child answer).
func (*Flashcard) FlashcardDue ¶
func (f *Flashcard) FlashcardDue(ctx context.Context, req *mcp.CallToolRequest, input types.FlashcardDueInput) (*mcp.CallToolResult, any, error)
FlashcardDue returns cards currently due for review.
func (*Flashcard) FlashcardOverview ¶
func (f *Flashcard) FlashcardOverview(ctx context.Context, req *mcp.CallToolRequest, input types.FlashcardOverviewInput) (*mcp.CallToolResult, any, error)
FlashcardOverview returns SRS statistics across all cards.
type Journal ¶
type Journal struct {
// contains filtered or unexported fields
}
Journal implements journal MCP tools.
func NewJournal ¶
NewJournal creates a new Journal tool handler.
func (*Journal) JournalRange ¶
func (j *Journal) JournalRange(ctx context.Context, req *mcp.CallToolRequest, input types.JournalRangeInput) (*mcp.CallToolResult, any, error)
JournalRange returns journal entries across a date range.
func (*Journal) JournalSearch ¶
func (j *Journal) JournalSearch(ctx context.Context, req *mcp.CallToolRequest, input types.JournalSearchInput) (*mcp.CallToolResult, any, error)
JournalSearch searches within journal entries.
type Navigate ¶
type Navigate struct {
// contains filtered or unexported fields
}
Navigate implements navigation MCP tools.
func NewNavigate ¶
NewNavigate creates a new Navigate tool handler.
func (*Navigate) GetBlock ¶
func (n *Navigate) GetBlock(ctx context.Context, req *mcp.CallToolRequest, input types.GetBlockInput) (*mcp.CallToolResult, any, error)
GetBlock retrieves a block with ancestors, children, and optionally siblings.
func (*Navigate) GetLinks ¶
func (n *Navigate) GetLinks(ctx context.Context, req *mcp.CallToolRequest, input types.GetLinksInput) (*mcp.CallToolResult, any, error)
GetLinks returns forward links and backlinks for a page.
func (*Navigate) GetPage ¶
func (n *Navigate) GetPage(ctx context.Context, req *mcp.CallToolRequest, input types.GetPageInput) (*mcp.CallToolResult, any, error)
GetPage retrieves a page with its full recursive block tree and parsed content.
func (*Navigate) GetReferences ¶
func (n *Navigate) GetReferences(ctx context.Context, req *mcp.CallToolRequest, input types.GetReferencesInput) (*mcp.CallToolResult, any, error)
GetReferences finds all blocks referencing a specific block via ((uuid)).
func (*Navigate) ListPages ¶
func (n *Navigate) ListPages(ctx context.Context, req *mcp.CallToolRequest, input types.ListPagesInput) (*mcp.CallToolResult, any, error)
ListPages lists pages with optional filtering.
func (*Navigate) Traverse ¶
func (n *Navigate) Traverse(ctx context.Context, req *mcp.CallToolRequest, input types.TraverseInput) (*mcp.CallToolResult, any, error)
Traverse finds paths between two pages using BFS on the link graph.
type Search ¶
type Search struct {
// contains filtered or unexported fields
}
Search implements search and query MCP tools.
func (*Search) FindByTag ¶
func (s *Search) FindByTag(ctx context.Context, req *mcp.CallToolRequest, input types.FindByTagInput) (*mcp.CallToolResult, any, error)
FindByTag finds content by tag, including child tags.
func (*Search) QueryDatalog ¶
func (s *Search) QueryDatalog(ctx context.Context, req *mcp.CallToolRequest, input types.QueryDatalogInput) (*mcp.CallToolResult, any, error)
QueryDatalog executes raw DataScript queries.
func (*Search) QueryProperties ¶
func (s *Search) QueryProperties(ctx context.Context, req *mcp.CallToolRequest, input types.QueryPropertiesInput) (*mcp.CallToolResult, any, error)
QueryProperties finds blocks/pages by property values.
func (*Search) Search ¶
func (s *Search) Search(ctx context.Context, req *mcp.CallToolRequest, input types.SearchInput) (*mcp.CallToolResult, any, error)
Search performs full-text search across all blocks with context. Uses FullTextSearcher (indexed) when available, falls back to brute-force scan.
type Whiteboard ¶
type Whiteboard struct {
// contains filtered or unexported fields
}
Whiteboard implements whiteboard MCP tools.
func NewWhiteboard ¶
func NewWhiteboard(c backend.Backend) *Whiteboard
NewWhiteboard creates a new Whiteboard tool handler.
func (*Whiteboard) GetWhiteboard ¶
func (w *Whiteboard) GetWhiteboard(ctx context.Context, req *mcp.CallToolRequest, input types.GetWhiteboardInput) (*mcp.CallToolResult, any, error)
GetWhiteboard retrieves a whiteboard's content including embedded pages and connections.
func (*Whiteboard) ListWhiteboards ¶
func (w *Whiteboard) ListWhiteboards(ctx context.Context, req *mcp.CallToolRequest, input types.ListWhiteboardsInput) (*mcp.CallToolResult, any, error)
ListWhiteboards returns all whiteboards in the graph.
type Write ¶
type Write struct {
// contains filtered or unexported fields
}
Write implements write MCP tools.
func (*Write) AppendBlocks ¶ added in v0.4.0
func (w *Write) AppendBlocks(ctx context.Context, req *mcp.CallToolRequest, input types.AppendBlocksInput) (*mcp.CallToolResult, any, error)
AppendBlocks appends plain-string blocks to an existing page (same API as create_page blocks).
func (*Write) BulkUpdateProperties ¶ added in v0.4.0
func (w *Write) BulkUpdateProperties(ctx context.Context, req *mcp.CallToolRequest, input types.BulkUpdatePropertiesInput) (*mcp.CallToolResult, any, error)
BulkUpdateProperties sets a property on multiple pages at once.
func (*Write) CreatePage ¶
func (w *Write) CreatePage(ctx context.Context, req *mcp.CallToolRequest, input types.CreatePageInput) (*mcp.CallToolResult, any, error)
CreatePage creates a new page with optional properties and initial blocks.
func (*Write) DeleteBlock ¶
func (w *Write) DeleteBlock(ctx context.Context, req *mcp.CallToolRequest, input types.DeleteBlockInput) (*mcp.CallToolResult, any, error)
DeleteBlock removes a block from the graph.
func (*Write) DeletePage ¶ added in v0.4.0
func (w *Write) DeletePage(ctx context.Context, req *mcp.CallToolRequest, input types.DeletePageInput) (*mcp.CallToolResult, any, error)
DeletePage removes a page from the graph.
func (*Write) LinkPages ¶
func (w *Write) LinkPages(ctx context.Context, req *mcp.CallToolRequest, input types.LinkPagesInput) (*mcp.CallToolResult, any, error)
LinkPages creates bidirectional links between two pages.
func (*Write) MoveBlock ¶
func (w *Write) MoveBlock(ctx context.Context, req *mcp.CallToolRequest, input types.MoveBlockInput) (*mcp.CallToolResult, any, error)
MoveBlock moves a block to a new location.
func (*Write) RenamePage ¶ added in v0.4.0
func (w *Write) RenamePage(ctx context.Context, req *mcp.CallToolRequest, input types.RenamePageInput) (*mcp.CallToolResult, any, error)
RenamePage renames a page and updates all links across the graph.
func (*Write) UpdateBlock ¶
func (w *Write) UpdateBlock(ctx context.Context, req *mcp.CallToolRequest, input types.UpdateBlockInput) (*mcp.CallToolResult, any, error)
UpdateBlock updates an existing block's content.
func (*Write) UpsertBlocksRaw ¶
func (w *Write) UpsertBlocksRaw(ctx context.Context, req *mcp.CallToolRequest) (*mcp.CallToolResult, error)
UpsertBlocksRaw is the raw ToolHandler for upsert_blocks (avoids recursive type cycle in schema generation).