Documentation
¶
Index ¶
- type AnalysisHealthInput
- type AppendBlocksInput
- type BackLink
- type BlockEntity
- type BlockInput
- type BlockRef
- type BlockSummary
- type BulkUpdatePropertiesInput
- type CreatePageInput
- type DecisionCheckInput
- type DecisionCreateInput
- type DecisionDeferInput
- type DecisionResolveInput
- type DeleteBlockInput
- type DeletePageInput
- type EnrichedBlock
- type EnrichedPage
- type FileInfo
- type FindByTagInput
- type FindConnectionsInput
- type FlashcardCreateInput
- type FlashcardDueInput
- type FlashcardOverviewInput
- type GetBlockInput
- type GetLinksInput
- type GetPageInput
- type GetReferencesInput
- type GetWhiteboardInput
- type GraphOverviewInput
- type JournalRangeInput
- type JournalSearchInput
- type KnowledgeGapsInput
- type LinkPagesInput
- type ListOrphansInput
- type ListPagesInput
- type ListWhiteboardsInput
- type LogseqAPIRequest
- type MoveBlockInput
- type NamespaceInfo
- type PageEntity
- type PageRef
- type ParsedContent
- type QueryDatalogInput
- type QueryPropertiesInput
- type RenamePageInput
- type SearchInput
- type SemanticSearchFilteredInput
- type SemanticSearchInput
- type SemanticSearchResult
- type SimilarInput
- type TopicClustersInput
- type TraverseInput
- type UpdateBlockInput
- type UpsertBlocksInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalysisHealthInput ¶
type AnalysisHealthInput struct{}
AnalysisHealthInput has no required params — audits all analysis/strategy pages.
type AppendBlocksInput ¶
type BackLink ¶
type BackLink struct {
PageName string `json:"pageName"`
Blocks []BlockSummary `json:"blocks"` // the specific blocks containing the link
}
BackLink represents an incoming link from another page.
type BlockEntity ¶
type BlockEntity struct {
ID int `json:"id"`
UUID string `json:"uuid"`
Content string `json:"content"`
Format string `json:"format,omitempty"`
Marker string `json:"marker,omitempty"` // TODO, DOING, DONE, etc.
Priority string `json:"priority,omitempty"` // A, B, C
Page *PageRef `json:"page,omitempty"`
Left *BlockRef `json:"left,omitempty"`
Parent *BlockRef `json:"parent,omitempty"`
Children []BlockEntity `json:"children,omitempty"`
Properties map[string]any `json:"properties,omitempty"`
PropertiesOrder []string `json:"propertiesOrder,omitempty"`
PathRefs []PageRef `json:"pathRefs,omitempty"`
Refs []PageRef `json:"refs,omitempty"`
PreBlock bool `json:"preBlock,omitempty"`
}
BlockEntity represents a Logseq block (the atomic unit of knowledge).
func (*BlockEntity) UnmarshalJSON ¶
func (b *BlockEntity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler for BlockEntity. It handles two Logseq JSON formats for the Children field:
- Full objects from getPageBlocksTree: [{"uuid":"...", "content":"...", ...}]
- Compact refs from getBlock: [["uuid", "value"]]
When children are in compact ref format, they are silently discarded and the Children field is left empty. The receiver's fields are populated from the unmarshaled data; an error is returned if the JSON cannot be parsed.
type BlockInput ¶
type BlockInput struct {
Content string `json:"content" jsonschema:"Block text content"`
Properties map[string]string `json:"properties,omitempty" jsonschema:"Block properties"`
Children []BlockInput `json:"children,omitempty" jsonschema:"Nested child blocks"`
}
type BlockRef ¶
type BlockRef struct {
ID int `json:"id"`
}
BlockRef is a lightweight block reference.
func (*BlockRef) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler for BlockRef. It handles both the number form (compact) and the object form ({"id": N}). The receiver's ID field is populated from the unmarshaled data; an error is returned if the JSON matches neither format.
type BlockSummary ¶
BlockSummary is a lightweight block representation for context.
type CreatePageInput ¶
type DecisionCheckInput ¶
type DecisionCheckInput struct {
IncludeResolved bool `json:"includeResolved,omitempty" jsonschema:"Include resolved (DONE) decisions. Default: false"`
}
type DecisionCreateInput ¶
type DecisionCreateInput struct {
Page string `json:"page" jsonschema:"Page to create the decision on (where context is richest)"`
Question string `json:"question" jsonschema:"The decision question"`
Deadline string `json:"deadline" jsonschema:"Decision deadline (YYYY-MM-DD)"`
Options []string `json:"options,omitempty" jsonschema:"Available choices"`
Context string `json:"context,omitempty" jsonschema:"Brief context for the decision"`
}
type DecisionDeferInput ¶
type DecisionResolveInput ¶
type DeleteBlockInput ¶
type DeleteBlockInput struct {
UUID string `json:"uuid" jsonschema:"UUID of block to delete"`
}
type DeletePageInput ¶
type DeletePageInput struct {
Name string `json:"name" jsonschema:"Page name to delete"`
}
type EnrichedBlock ¶
type EnrichedBlock struct {
BlockEntity
Parsed ParsedContent `json:"parsed"`
Ancestors []BlockSummary `json:"ancestors,omitempty"` // path from root to this block
Siblings []BlockSummary `json:"siblings,omitempty"`
}
EnrichedBlock extends BlockEntity with parsed content and ancestor chain.
type EnrichedPage ¶
type EnrichedPage struct {
PageEntity
Blocks []EnrichedBlock `json:"blocks"`
OutgoingLinks []string `json:"outgoingLinks"` // pages this page links to
BackLinks []BackLink `json:"backlinks"` // pages that link to this page
BlockCount int `json:"blockCount"`
LinkCount int `json:"linkCount"`
}
EnrichedPage extends PageEntity with its full block tree and link data.
type FindByTagInput ¶
type FindConnectionsInput ¶
type FlashcardCreateInput ¶
type FlashcardDueInput ¶
type FlashcardDueInput struct {
Limit int `json:"limit,omitempty" jsonschema:"Max cards to return. Default: 20"`
}
type FlashcardOverviewInput ¶
type FlashcardOverviewInput struct{}
FlashcardOverviewInput has no required params — returns SRS statistics.
type GetBlockInput ¶
type GetBlockInput struct {
UUID string `json:"uuid" jsonschema:"Block UUID to retrieve"`
IncludeAncestors bool `json:"includeAncestors,omitempty" jsonschema:"Include ancestor chain from root. Default: true"`
IncludeSiblings bool `json:"includeSiblings,omitempty" jsonschema:"Include sibling blocks. Default: false"`
}
type GetLinksInput ¶
type GetPageInput ¶
type GetPageInput struct {
Name string `json:"name" jsonschema:"Page name to retrieve"`
Depth int `json:"depth,omitempty" jsonschema:"Max block tree depth (-1 for unlimited). Default: -1"`
MaxBlocks int `json:"maxBlocks,omitempty" jsonschema:"Max total blocks to return. Truncates with a flag when exceeded. Default: unlimited"`
Compact bool `` /* 132-byte string literal not displayed */
}
type GetReferencesInput ¶
type GetReferencesInput struct {
UUID string `json:"uuid" jsonschema:"Block UUID to find references for"`
}
type GetWhiteboardInput ¶
type GetWhiteboardInput struct {
Name string `json:"name" jsonschema:"Whiteboard name"`
}
type GraphOverviewInput ¶
type GraphOverviewInput struct{}
GraphOverviewInput has no required params — returns global stats.
type JournalRangeInput ¶
type JournalSearchInput ¶
type KnowledgeGapsInput ¶
type KnowledgeGapsInput struct {
MinBlockCount int `json:"minBlockCount,omitempty" jsonschema:"Minimum block count for orphan pages. Filters out stray/empty pages. Default: 0"`
ExcludeNumeric bool `json:"excludeNumeric,omitempty" jsonschema:"Exclude pages with purely numeric names (stray block refs). Default: false"`
}
KnowledgeGapsInput controls knowledge gap analysis filtering.
type LinkPagesInput ¶
type ListOrphansInput ¶
type ListOrphansInput struct {
MinBlockCount int `json:"minBlockCount,omitempty" jsonschema:"Minimum block count to include. Filters stray/empty pages. Default: 0"`
ExcludeNumeric bool `json:"excludeNumeric,omitempty" jsonschema:"Exclude pages with purely numeric names (stray block refs). Default: false"`
Limit int `json:"limit,omitempty" jsonschema:"Max orphans to return. Default: 50"`
}
ListOrphansInput controls orphan page listing.
type ListPagesInput ¶
type ListPagesInput struct {
Namespace string `json:"namespace,omitempty" jsonschema:"Filter by namespace prefix (e.g. projects)"`
HasProperty string `json:"hasProperty,omitempty" jsonschema:"Filter to pages with this property key"`
HasTag string `json:"hasTag,omitempty" jsonschema:"Filter to pages with this tag"`
SortBy string `json:"sortBy,omitempty" jsonschema:"Sort by: name or modified or created. Default: name"`
Limit int `json:"limit,omitempty" jsonschema:"Max results. Default: 50"`
}
type ListWhiteboardsInput ¶
type ListWhiteboardsInput struct{}
ListWhiteboardsInput has no required params.
type LogseqAPIRequest ¶
LogseqAPIRequest is the JSON body sent to the Logseq HTTP API.
type MoveBlockInput ¶
type NamespaceInfo ¶
type NamespaceInfo struct {
ID int `json:"id"`
}
NamespaceInfo contains namespace hierarchy data.
type PageEntity ¶
type PageEntity struct {
ID int `json:"id"`
UUID string `json:"uuid"`
Name string `json:"name"`
OriginalName string `json:"originalName"`
Journal bool `json:"journal?"`
JournalDay int `json:"journalDay,omitempty"`
Namespace *NamespaceInfo `json:"namespace,omitempty"`
Properties map[string]any `json:"properties,omitempty"`
PropertiesOrder []string `json:"propertiesOrder,omitempty"`
CreatedAt int64 `json:"createdAt,omitempty"`
UpdatedAt int64 `json:"updatedAt,omitempty"`
File *FileInfo `json:"file,omitempty"`
}
PageEntity represents a Logseq page.
type PageRef ¶
PageRef is a lightweight page reference (used in block refs and path refs).
func (*PageRef) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler for PageRef. It handles both the number form (compact, from write operations) and the object form ({"id": N, "name": "..."}). The receiver's ID and Name fields are populated from the unmarshaled data; an error is returned if the JSON matches neither format.
type ParsedContent ¶
type ParsedContent struct {
Raw string `json:"raw"`
Links []string `json:"links"` // [[page name]]
BlockReferences []string `json:"blockReferences"` // ((uuid))
Tags []string `json:"tags"` // #tag
Properties map[string]string `json:"properties,omitempty"` // key:: value
Marker string `json:"marker,omitempty"` // TODO, DOING, DONE
Priority string `json:"priority,omitempty"` // [#A], [#B], [#C]
}
ParsedContent holds structured data extracted from block content.
type QueryDatalogInput ¶
type QueryPropertiesInput ¶
type QueryPropertiesInput struct {
Property string `json:"property" jsonschema:"Property key to search for"`
Value string `json:"value,omitempty" jsonschema:"Property value to match (omit to find all with this property)"`
Operator string `json:"operator,omitempty" jsonschema:"Comparison: eq or contains or gt or lt. Default: eq"`
}
type RenamePageInput ¶
type SearchInput ¶
type SearchInput struct {
Query string `json:"query" jsonschema:"Search text to find across all blocks"`
ContextLines int `json:"contextLines,omitempty" jsonschema:"Number of parent/sibling blocks for context. Default: 2"`
Limit int `json:"limit,omitempty" jsonschema:"Max results. Default: 20"`
Compact bool `` /* 142-byte string literal not displayed */
}
type SemanticSearchFilteredInput ¶
type SemanticSearchFilteredInput struct {
Query string `json:"query" jsonschema:"Natural language search query"`
SourceType string `json:"source_type,omitempty" jsonschema:"Filter by source type: disk, github, web"`
SourceID string `json:"source_id,omitempty" jsonschema:"Filter by specific source identifier (e.g., github-gaze)"`
HasProperty string `json:"has_property,omitempty" jsonschema:"Filter to pages with this frontmatter property key"`
HasTag string `json:"has_tag,omitempty" jsonschema:"Filter to pages with this tag"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum number of results. Default: 10"`
Threshold float64 `json:"threshold,omitempty" jsonschema:"Minimum similarity score (0.0-1.0). Default: 0.3"`
}
SemanticSearchFilteredInput is the input for the dewey_semantic_search_filtered MCP tool.
type SemanticSearchInput ¶
type SemanticSearchInput struct {
Query string `json:"query" jsonschema:"Natural language search query"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum number of results. Default: 10"`
Threshold float64 `json:"threshold,omitempty" jsonschema:"Minimum similarity score (0.0-1.0). Default: 0.3"`
}
SemanticSearchInput is the input for the dewey_semantic_search MCP tool.
type SemanticSearchResult ¶
type SemanticSearchResult struct {
DocumentID string `json:"document_id"`
Page string `json:"page"`
Content string `json:"content"`
Similarity float64 `json:"similarity"`
Source string `json:"source"`
SourceID string `json:"source_id"`
OriginURL string `json:"origin_url,omitempty"`
IndexedAt string `json:"indexed_at"`
}
SemanticSearchResult represents a single result from semantic search. Includes provenance metadata per Constitution III (Observable Quality).
type SimilarInput ¶
type SimilarInput struct {
Page string `json:"page,omitempty" jsonschema:"Page name to find similar documents for"`
UUID string `json:"uuid,omitempty" jsonschema:"Block UUID to find similar blocks for. Takes precedence over page."`
Limit int `json:"limit,omitempty" jsonschema:"Maximum number of results. Default: 10"`
}
SimilarInput is the input for the dewey_similar MCP tool.
type TopicClustersInput ¶
type TopicClustersInput struct{}
TopicClustersInput has no required params — returns community clusters.
type TraverseInput ¶
type UpdateBlockInput ¶
type UpsertBlocksInput ¶
type UpsertBlocksInput struct {
Page string `json:"page" jsonschema:"Page name to add blocks to"`
Blocks []BlockInput `json:"blocks" jsonschema:"Blocks to create or update"`
Position string `json:"position,omitempty" jsonschema:"Where to add: append or prepend. Default: append"`
}