UNPKG

@runbook-docs/mcp-server

Version:
566 lines (565 loc) 17.6 kB
import { McpState } from '../state'; export declare const toolHandlers: (state: McpState) => { [x: string]: { description: string; inputSchema: { type: string; properties: { scope: { type: string; description: string; default: string; }; keywords: { type: string; description: string; }; limit: { type: string; description: string; }; offset: { type: string; description: string; }; orderBy: { type: string; enum: string[]; description: string; default: string; }; articleUid?: undefined; bookUid?: undefined; articleName?: undefined; categoryUid?: undefined; name?: undefined; bodyMarkdown?: undefined; categoryUids?: undefined; bookName?: undefined; folderUid?: undefined; runStateUid?: undefined; propertyValues?: undefined; filename?: undefined; content_type?: undefined; }; required: string[]; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: (params: any) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { articleUid: { type: string; description: string; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; orderBy?: undefined; bookUid?: undefined; articleName?: undefined; categoryUid?: undefined; name?: undefined; bodyMarkdown?: undefined; categoryUids?: undefined; bookName?: undefined; folderUid?: undefined; runStateUid?: undefined; propertyValues?: undefined; filename?: undefined; content_type?: undefined; }; required: string[]; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: ({ articleUid }: { articleUid: string; }) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { bookUid: { type: string; description: string; }; articleName: { type: string; description: string; }; categoryUid: { type: string; description: string; }; orderBy: { type: string; enum: string[]; description: string; default?: undefined; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; articleUid?: undefined; name?: undefined; bodyMarkdown?: undefined; categoryUids?: undefined; bookName?: undefined; folderUid?: undefined; runStateUid?: undefined; propertyValues?: undefined; filename?: undefined; content_type?: undefined; }; required: string[]; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: (props: any) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { bookUid: { type: string; description: string; }; name: { type: string; description: string; }; bodyMarkdown: { type: string; description: string; }; categoryUids: { type: string; items: { type: string; }; description: string; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; orderBy?: undefined; articleUid?: undefined; articleName?: undefined; categoryUid?: undefined; bookName?: undefined; folderUid?: undefined; runStateUid?: undefined; propertyValues?: undefined; filename?: undefined; content_type?: undefined; }; required?: undefined; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: ({ bookUid, name, bodyMarkdown, categoryUids }: { bookUid: string; name: string; bodyMarkdown?: string; categoryUids?: string[]; }) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { articleUid: { type: string; description: string; }; name: { type: string; description: string; }; bodyMarkdown: { type: string; description: string; }; categoryUids: { type: string; items: { type: string; }; description: string; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; orderBy?: undefined; bookUid?: undefined; articleName?: undefined; categoryUid?: undefined; bookName?: undefined; folderUid?: undefined; runStateUid?: undefined; propertyValues?: undefined; filename?: undefined; content_type?: undefined; }; required: string[]; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: ({ articleUid, name, bodyMarkdown, categoryUids }: { articleUid: string; name?: string; bodyMarkdown?: string; categoryUids?: string[]; }) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { bookName: { type: string; description: string; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; orderBy?: undefined; articleUid?: undefined; bookUid?: undefined; articleName?: undefined; categoryUid?: undefined; name?: undefined; bodyMarkdown?: undefined; categoryUids?: undefined; folderUid?: undefined; runStateUid?: undefined; propertyValues?: undefined; filename?: undefined; content_type?: undefined; }; required?: undefined; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: ({ bookName }: { bookName?: string; }) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { bookUid: { type: string; description: string; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; orderBy?: undefined; articleUid?: undefined; articleName?: undefined; categoryUid?: undefined; name?: undefined; bodyMarkdown?: undefined; categoryUids?: undefined; bookName?: undefined; folderUid?: undefined; runStateUid?: undefined; propertyValues?: undefined; filename?: undefined; content_type?: undefined; }; required: string[]; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: ({ bookUid }: { bookUid: string; }) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { bookUid: { type: string; description: string; }; folderUid: { type: string; description: string; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; orderBy?: undefined; articleUid?: undefined; articleName?: undefined; categoryUid?: undefined; name?: undefined; bodyMarkdown?: undefined; categoryUids?: undefined; bookName?: undefined; runStateUid?: undefined; propertyValues?: undefined; filename?: undefined; content_type?: undefined; }; required: string[]; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: ({ bookUid, folderUid }: { bookUid: string; folderUid?: string; }) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { bookUid: { type: string; description: string; }; runStateUid: { type: string; description: string; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; orderBy?: undefined; articleUid?: undefined; articleName?: undefined; categoryUid?: undefined; name?: undefined; bodyMarkdown?: undefined; categoryUids?: undefined; bookName?: undefined; folderUid?: undefined; propertyValues?: undefined; filename?: undefined; content_type?: undefined; }; required: string[]; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: ({ bookUid, runStateUid }: { bookUid: string; runStateUid?: string; }) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { bookUid: { type: string; description: string; }; articleUid: { type: string; description: string; }; runStateUid: { type: string; description: string; }; propertyValues: { type: string; description: string; default: {}; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; orderBy?: undefined; articleName?: undefined; categoryUid?: undefined; name?: undefined; bodyMarkdown?: undefined; categoryUids?: undefined; bookName?: undefined; folderUid?: undefined; filename?: undefined; content_type?: undefined; }; required: string[]; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: ({ bookUid, articleUid, runStateUid, propertyValues }: { bookUid: string; articleUid: string; runStateUid?: string; propertyValues?: Record<string, string | string[]>; }) => Promise<{ content: { type: string; text: string; }[]; }>; } | { description: string; inputSchema: { type: string; properties: { filename: { type: string; description: string; }; content_type: { type: string; description: string; }; scope?: undefined; keywords?: undefined; limit?: undefined; offset?: undefined; orderBy?: undefined; articleUid?: undefined; bookUid?: undefined; articleName?: undefined; categoryUid?: undefined; name?: undefined; bodyMarkdown?: undefined; categoryUids?: undefined; bookName?: undefined; folderUid?: undefined; runStateUid?: undefined; propertyValues?: undefined; }; required: string[]; }; annotations: { destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; readOnlyHint: boolean; title: string; }; handler: ({ filename, content_type }: { filename: string; content_type?: string; }) => Promise<{ content: { type: string; text: string; }[]; }>; }; };