tools

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

func NewAnalyze(c backend.Backend) *Analyze

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

func NewDecision(c backend.Backend) *Decision

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

func NewFlashcard(c backend.Backend) *Flashcard

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

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

func NewJournal(c backend.Backend) *Journal

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 struct {
	// contains filtered or unexported fields
}

Navigate implements navigation MCP tools.

func NewNavigate

func NewNavigate(c backend.Backend) *Navigate

NewNavigate creates a new Navigate tool handler.

GetBlock retrieves a block with ancestors, children, and optionally siblings.

GetLinks returns forward links and backlinks for a page.

GetPage retrieves a page with its full recursive block tree and parsed content.

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)).

ListPages lists pages with optional filtering.

Traverse finds paths between two pages using BFS on the link graph.

type Search struct {
	// contains filtered or unexported fields
}

Search implements search and query MCP tools.

func NewSearch

func NewSearch(c backend.Backend) *Search

NewSearch creates a new Search tool handler.

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

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

GetWhiteboard retrieves a whiteboard's content including embedded pages and connections.

func (*Whiteboard) ListWhiteboards

ListWhiteboards returns all whiteboards in the graph.

type Write

type Write struct {
	// contains filtered or unexported fields
}

Write implements write MCP tools.

func NewWrite

func NewWrite(c backend.Backend) *Write

NewWrite creates a new Write tool handler.

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL