Skip to main content
Glama
EricSeokgon

egovframe-scaffold-mcp

by EricSeokgon

DB 준비·적재 확인

prepare_egovframe_database

Prepares eGovFrame common-component or project DB scripts for dev and test databases by selecting sources, splitting and ordering schema/data, and generating deployable SQL and Docker Compose files.

Instructions

공통컴포넌트·프로젝트의 DB 스크립트를 개발·테스트 DB 에 바로 넣을 수 있게 준비합니다. 원본은 자동으로 고릅니다 — 조립 선별본(scripts/egovframe-components//, 매니페스트 설치 순서) → 공통컴포넌트 전체(script/ddl·dml//) → 이름 규칙(ddl·schema / dml·data), 또는 scripts 로 지정. 문장 단위로 나눠 스키마·데이터로 가르고, 겹친 문장을 한 번만 두고, 외래키·뷰 참조 순서로 테이블을 정렬하며(데이터도 부모 행이 먼저), 선별본이 참조하는데 빠진 테이블(예: COMTCCMMNDETAILCODE → COMTCCMMNCODE)은 공통컴포넌트 통합 스크립트에서 보완합니다. MySQL·MariaDB 는 테이블마다 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci 와 스크립트 머리의 SET NAMES utf8mb4 로 클라이언트 문자셋과 무관하게 한글이 같게 저장되게 하고(Docker 초기화의 한글 이중 인코딩·latin1 클라이언트의 정렬 규칙 충돌), PostgreSQL 은 client_encoding UTF8. 산출물은 scripts/egovframe-db//01-schema.sql·02-data.sql 과 docker-compose.db.yml(MySQL 8.4·MariaDB 11.4·PostgreSQL 16, 접속 정보는 프로젝트 설정), 적재 명령(bash·cmd). Oracle·Tibero·Altibase·CUBRID 는 스크립트·명령만. run=true 면 Docker 로 DB 를 띄워 넣고 테이블 수·필수 행(관리자 계정·메뉴·공통코드)·한글 왕복을 확인한 뒤 컨테이너를 지웁니다(keep=true 면 남김). 기본 dryRun, 기존 파일은 덮어쓰지 않습니다(다른 내용이면 거부). 운영 DB 적재·스키마 이관은 하지 않습니다.

Input Schema

NameRequiredDescriptionDefault
runNoDocker 로 DB 를 띄워 적재·확인(mysql·maria·postgres)
keepNorun=true 뒤 컨테이너를 남김
dryRunNotrue(기본)면 파일을 쓰지 않고 계획만
formatNo응답 형식markdown
offlineNotrue 면 빠진 참조 테이블 보완에 공통컴포넌트 저장소를 내려받지 않음
scriptsNo직접 고를 원본 스크립트(프로젝트 상대 경로, 순서대로)
databaseNoDB 종류(기본: 프로젝트 Globals.DbType·JDBC URL)
timeoutMsNorun=true 초기화 대기 제한(ms)
projectDirYes프로젝트 디렉터리(절대경로 권장)
imageRegistryNoDB 이미지 레지스트리(사내 미러 등)docker.io/library
includeCommentsNo공통컴포넌트 전체의 주석 스크립트(script/comment/<db>/)도 넣음

Output Schema

NameRequiredDescriptionDefault
runNo
notesYes
viewsYes
dryRunYes
tablesYes
outputsYes
sourcesYes
commandsYes
databaseYes
connectionYes
projectDirYes
statementsYes
charsetFixedYes
databaseFromYes
supplementedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.10.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations (readOnly=false, openWorld=true, non-idempotent, non-destructive): discloses container lifecycle, that existing files are never overwritten (rejects on differing content), charset/collation handling, and verification steps (table count, required rows, Korean round-trip). The container deletion is the tool's own scratch resource, not an annotation contradiction with destructiveHint=false, but that nuance is left implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and source-selection priority, then detail. It is dense and long, with some very low-level charset internals that exceed selection needs, but nearly every clause carries actionable invocation information rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter mutation tool with an output schema, the description covers source selection, transformation logic, outputs, container behavior, safety constraints, and exclusions—everything an agent needs to invoke correctly. Return values are covered by the output schema, so no gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage the baseline is 3, and the prose meaningfully contextualizes several key params—run, keep, dryRun, scripts, offline, includeComments, database—their interaction and defaults. It does not add much for timeoutMs, imageRegistry, or format, relying on the schema there.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (prepare DB scripts) and resource (DB schema/data scripts for common components/project), and clearly distinguishes it as a DB-preparation tool rather than project scaffolding or migration. An agent can tell what it does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains invocation modes explicitly: default dryRun writes nothing, run=true spins Docker and verifies then tears down, keep=true retains the container, and 'scripts' overrides automatic source selection. It also gives an explicit exclusion ('운영 DB 적재·스키마 이관은 하지 않습니다'), routing production-DB work elsewhere.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.