@cano721/mysql-mcp-server 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -792,6 +792,7 @@ echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npx @cano721/mysql-mcp-s
792
792
 
793
793
  | 버전 | 날짜 | 주요 변경 사항 |
794
794
  |------|------|---------------|
795
+ | 0.9.0 | 2025-01-09 | `get_related_tables` 테이블/CSV 형식 추가 (엑셀 복사 지원) |
795
796
  | 0.8.0 | 2025-01-09 | `get_related_tables`에 패턴 매칭 옵션 추가, depth 제한 제거 |
796
797
  | 0.7.0 | 2025-01-09 | `get_related_tables` 도구 추가 (FK 기반 연관 테이블 depth별 조회) |
797
798
  | 0.6.0 | 2025-01-09 | `analyze_table` → `analyze_query`로 변경, `@latest` 태그 문서 추가 |
package/build/index.js CHANGED
@@ -122,7 +122,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
122
122
  },
123
123
  {
124
124
  name: "get_related_tables",
125
- description: "Get all tables related to a specific table through foreign keys (parent and child relationships with depth). Results are based on FK constraints only. Set include_pattern_match=true to also find tables by column name patterns.",
125
+ description: "Find all related/connected/associated tables linked to a specific table through foreign keys. Discovers table relationships and dependencies with depth traversal. Use this when asked to find related tables, connected tables, associated tables, or table relationships.",
126
126
  inputSchema: {
127
127
  type: "object",
128
128
  properties: {
@@ -429,14 +429,30 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
429
429
  }
430
430
  }
431
431
  }
432
+ // Generate table format (Markdown)
433
+ const allRelations = [...results, ...patternMatchResults];
434
+ let tableFormat = '| depth | child_table | fk_column | parent_table | constraint_name | match_type |\n';
435
+ tableFormat += '|-------|-------------|-----------|--------------|-----------------|------------|\n';
436
+ for (const rel of allRelations) {
437
+ tableFormat += `| ${rel.depth} | ${rel.child_table} | ${rel.fk_column} | ${rel.parent_table} | ${rel.constraint_name} | ${rel.match_type} |\n`;
438
+ }
439
+ // Generate CSV format
440
+ let csvFormat = 'depth,child_table,fk_column,parent_table,constraint_name,match_type\n';
441
+ for (const rel of allRelations) {
442
+ csvFormat += `${rel.depth},"${rel.child_table}","${rel.fk_column}","${rel.parent_table}","${rel.constraint_name}",${rel.match_type}\n`;
443
+ }
432
444
  const response = {
433
- root_table: table,
434
- database: dbName,
435
- requested_depth: requestedDepth,
436
- search_method: includePatternMatch ? 'fk_constraint + pattern_match' : 'fk_constraint',
437
- fk_relations_count: results.length,
438
- pattern_match_count: patternMatchResults.length,
439
- total_relations: results.length + patternMatchResults.length,
445
+ summary: {
446
+ root_table: table,
447
+ database: dbName,
448
+ requested_depth: requestedDepth,
449
+ search_method: includePatternMatch ? 'fk_constraint + pattern_match' : 'fk_constraint',
450
+ fk_relations_count: results.length,
451
+ pattern_match_count: patternMatchResults.length,
452
+ total_relations: allRelations.length
453
+ },
454
+ table_format: tableFormat,
455
+ csv_format: csvFormat,
440
456
  fk_relations: results,
441
457
  pattern_match_relations: includePatternMatch ? patternMatchResults : undefined,
442
458
  note: includePatternMatch
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cano721/mysql-mcp-server",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "An MCP server that provides read-only access to MySQL databases.",
5
5
  "type": "module",
6
6
  "bin": {