mcp-adr-analysis-server
Version:
MCP server for analyzing Architectural Decision Records and project architecture
62 lines • 2.38 kB
TypeScript
/**
* LLM-Managed Database Management Tool
*
* Provides LLM-driven database operations with research-driven approach
*/
import type { ToolContext } from '../types/tool-context.js';
/**
* LLM-managed database operations with research-driven approach
*
* @description Executes database operations using LLM to research best practices,
* generate appropriate commands, and execute them. Supports PostgreSQL, MongoDB, Redis, MySQL, and MariaDB.
*
* @param {Object} args - Database management configuration parameters
* @param {string} args.database - Database type (postgresql, mongodb, redis, mysql, mariadb)
* @param {string} args.action - Action to perform
* @param {Object} [args.parameters] - Action parameters
* @param {string} args.llmInstructions - LLM instructions for command generation
* @param {boolean} [args.researchFirst] - Research best approach first (default: true)
* @param {string} [args.projectPath] - Path to project root (defaults to cwd)
* @param {string} [args.adrDirectory] - ADR directory relative to project (defaults to 'docs/adrs')
*
* @returns {Promise<any>} Database operation results with LLM analysis
*
* @throws {McpAdrError} When required parameters are missing or operation fails
*
* @example
* ```typescript
* // PostgreSQL database creation
* const result = await llmDatabaseManagement({
* database: 'postgresql',
* action: 'create_database',
* parameters: { dbName: 'myapp', owner: 'myuser' },
* llmInstructions: 'Create a secure database with proper permissions'
* });
* ```
*
* @example
* ```typescript
* // MongoDB collection optimization
* const result = await llmDatabaseManagement({
* database: 'mongodb',
* action: 'optimize_collection',
* parameters: { collection: 'users', indexFields: ['email', 'created_at'] },
* llmInstructions: 'Optimize for read-heavy workloads with proper indexing'
* });
* ```
*
* @since 2.1.0
* @category Database Management
* @category LLM
* @mcp-tool
*/
export declare function llmDatabaseManagement(args: {
database: 'postgresql' | 'mongodb' | 'redis' | 'mysql' | 'mariadb';
action: string;
parameters?: Record<string, any>;
llmInstructions: string;
researchFirst?: boolean;
projectPath?: string;
adrDirectory?: string;
}, context?: ToolContext): Promise<any>;
//# sourceMappingURL=llm-database-management-tool.d.ts.map