ai-knowledge-hub
Version:
MCP server that provides unified access to organizational knowledge across multiple platforms (local docs, Guru, Notion)
115 lines (114 loc) • 2.79 kB
TypeScript
/**
* MCP Tools for Notion Operations
* Simplified to just the 5 essential tools - all operations go through NotionService
*/
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
/**
* Initialize the NotionService with configuration
*/
export declare function initializeNotionService(): void;
/**
* Tool 1: List/Query/Search Database
*/
export declare function listDatabasePagesTool({ limit, search, category, tags, status, sortBy, sortOrder, startCursor, searchMode, }: {
limit?: number;
search?: string;
category?: string;
tags?: string[];
status?: string;
sortBy?: 'title' | 'last_edited' | 'created' | 'category' | 'status';
sortOrder?: 'ascending' | 'descending';
startCursor?: string;
searchMode?: 'tags' | 'full-text' | 'combined';
}): Promise<{
content: Array<{
type: 'text';
text: string;
}>;
}>;
/**
* Tool 2: Create Page (from markdown content or file)
*/
export declare function createPageFromMarkdownTool({ markdown, filePath, pageTitle, metadata }: {
markdown?: string;
filePath?: string;
pageTitle?: string;
metadata?: {
category?: string;
tags?: string[];
description?: string;
status?: string;
};
}): Promise<{
content: Array<{
type: 'text';
text: string;
}>;
}>;
/**
* Tool 2.5: List Available Categories
*/
export declare function listCategoriesTool(): Promise<{
content: Array<{
type: 'text';
text: string;
}>;
}>;
/**
* Tool 3: Update Page (metadata and/or content)
*/
export declare function updatePageTool({ pageId, markdown, filePath, category, tags, description }: {
pageId: string;
markdown?: string;
filePath?: string;
category?: string;
tags?: string[];
description?: string;
}): Promise<{
content: Array<{
type: 'text';
text: string;
}>;
}>;
/**
* Tool 3.5: Update Page Metadata Only
*/
export declare function updatePageMetadataTool(args: {
pageId: string;
category?: string;
tags?: string[];
status?: string;
description?: string;
}): Promise<{
content: Array<{
type: 'text';
text: string;
}>;
}>;
/**
* Tool 4: Archive Page
*/
export declare function archivePageTool({ pageId }: {
pageId: string;
}): Promise<{
content: Array<{
type: 'text';
text: string;
}>;
}>;
/**
* Tool 5: Export Page (to markdown)
*/
export declare function exportPageToMarkdownTool({ pageId, saveToFile }: {
pageId: string;
saveToFile?: string;
}): Promise<{
content: Array<{
type: 'text';
text: string;
}>;
}>;
/**
* Configure Notion tools for MCP server
*/
export declare function configureNotionTools(server: McpServer): void;