Claude sub-agents, PRD, MCP improvements (#359)
1. Added Claude Code sub-agents 2. Added PRD tool to MCP Server 3. Added MCP Server UI to Dev Tools 4. Improved MCP Server Database Tool 5. Updated dependencies
This commit is contained in:
committed by
GitHub
parent
02e2502dcc
commit
2b8572baaa
@@ -0,0 +1,32 @@
|
||||
'use server';
|
||||
|
||||
import { relative } from 'path';
|
||||
|
||||
import { DatabaseTool } from '@kit/mcp-server/database';
|
||||
|
||||
export async function getTableDetailsAction(
|
||||
tableName: string,
|
||||
schema = 'public',
|
||||
) {
|
||||
try {
|
||||
DatabaseTool.ROOT_PATH = relative(process.cwd(), '../..');
|
||||
|
||||
console.log('Fetching table info for:', { tableName, schema });
|
||||
|
||||
const tableInfo = await DatabaseTool.getTableInfo(schema, tableName);
|
||||
|
||||
console.log('Successfully fetched table info:', tableInfo);
|
||||
|
||||
return {
|
||||
success: true,
|
||||
data: tableInfo,
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Error fetching table info:', error);
|
||||
|
||||
return {
|
||||
success: false,
|
||||
error: `Failed to fetch table information: ${(error as Error).message}`,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user