openai-assistants-mcp
Version:
OpenAI Assistants MCP Server - A Model Context Protocol server providing OpenAI Assistants API tools and resources. Features comprehensive assistant management, thread operations, message handling, and run execution with seamless stdio transport for Claud
74 lines • 3.27 kB
TypeScript
/**
* Handler Index - Central export point for all tool handlers
*
* This file provides:
* - Convenient imports for all handler categories
* - Factory function to create all handlers at once
* - Type-safe handler registration
* - Easy integration with the ToolRegistry
*/
import { BaseToolHandler, ToolHandlerContext } from './base-tool-handler.js';
export { BaseToolHandler } from './base-tool-handler.js';
export type { ToolHandlerContext } from './base-tool-handler.js';
export { createAssistantHandlers } from './assistant-handlers.js';
export { createThreadHandlers } from './thread-handlers.js';
export { createMessageHandlers } from './message-handlers.js';
export { createRunHandlers } from './run-handlers.js';
export { createRunStepHandlers } from './run-step-handlers.js';
export { createCompletionHandlers } from './completion-handlers.js';
/**
* Create all tool handlers for the MCP server
*
* This factory function creates and returns all handlers organized by category.
* It provides a single point to instantiate the complete handler system.
*
* @param context - The handler context containing OpenAI service and request info
* @returns Object containing all handlers organized by category
*/
export declare function createAllHandlers(context: ToolHandlerContext): {
assistant: Record<string, BaseToolHandler>;
thread: Record<string, BaseToolHandler>;
message: Record<string, BaseToolHandler>;
run: Record<string, BaseToolHandler>;
runStep: Record<string, BaseToolHandler>;
all: Record<string, BaseToolHandler>;
};
/**
* Get a flat map of all tool handlers
*
* Convenience function that returns just the flat map of all handlers,
* which is what the ToolRegistry expects for batch registration.
*
* @param context - The handler context
* @returns Flat map of tool name to handler instance
*/
export declare function createFlatHandlerMap(context: ToolHandlerContext): Record<string, BaseToolHandler>;
/**
* Handler categories and their tool counts
* Useful for validation and introspection
*/
export declare const HANDLER_CATEGORIES: {
readonly assistant: readonly ["assistant-create", "assistant-list", "assistant-get", "assistant-update", "assistant-delete"];
readonly thread: readonly ["thread-create", "thread-get", "thread-update", "thread-delete"];
readonly message: readonly ["message-create", "message-list", "message-get", "message-update", "message-delete"];
readonly run: readonly ["run-create", "run-list", "run-get", "run-update", "run-cancel", "run-submit-tool-outputs"];
readonly runStep: readonly ["run-step-list", "run-step-get"];
};
/**
* Total number of tools handled by the system
* Note: This is calculated dynamically based on registered handlers
* rather than being hardcoded to maintain provider-agnostic flexibility
*/
export declare function getTotalToolCount(): number;
/**
* Validate that all expected tools have handlers
*
* @param handlers - The handler map to validate
* @returns Validation result with missing tools if any
*/
export declare function validateHandlerCompleteness(handlers: Record<string, BaseToolHandler>): {
isComplete: boolean;
missingTools: string[];
extraTools: string[];
};
//# sourceMappingURL=index.d.ts.map