| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Invoke | /mcp-toolkit:seed |
| Category | cocode-flutter |
| Complexity | simple |
| MCP Servers | mcp_flutter |
/mcp-toolkit seed โ ํ ์คํธ์ฉ ๊ฐ์ง ๋ฐ์ดํฐ ํ ๋ฒ์ ๊น๊ธฐ#
ํ๋ง๋๋ก#
์ฑ ํ๋ฉด์ ์ ๊ฒํ๊ธฐ ์ ์ ๋ฏธ๋ฆฌ ๋ง๋ค์ด ๋ ์ํ ๋ฐ์ดํฐ๋ฅผ ํ ๋ฒ์ ์ฑ์ ๋ฃ์ด ์ฃผ๋ ๋จ์ถ ๋ฒํผ์ ๋๋ค. ์ฐ๊ทน ๋ฌด๋์ ์ํ์ ๋ฏธ๋ฆฌ ๋ฐฐ์นํด ๋๊ณ ๋ง์ ์ฌ๋ฆฌ๋ ๊ฒ๊ณผ ๊ฐ์์. ๋งค๋ฒ ์์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ๋ฃ๋ ๋์ , ์ค๋น๋ ์ธํธ(fixture)๋ฅผ ๊ณจ๋ผ ํ ์ค๋ก ๊น ์ ์์ต๋๋ค.
๋๊ฐยท์ธ์ ์ฐ๋์#
- ๊ฐ๋ฐ์๊ฐ ํน์ ํ๋ฉด์ ์ค์ ๋ฐ์ดํฐ๊ฐ ๋ค์ด์ฐฌ ์ํ๋ก ๋น ๋ฅด๊ฒ ๋์ ๋ณด๊ณ ์ถ์ ๋
- "๊ธ 10๊ฐ๊ฐ ์๋ ํผ๋ ํ๋ฉด"์ฒ๋ผ ์ ํด์ง ์ํฉ์ ๋ฐ๋ณตํด์ ์ฌํํด์ผ ํ ๋ (ํ ์คํธยท๋๋ฒ๊น )
- ํ๋ฉด๋ง๋ค ๋ฐ์ดํฐ๋ฅผ ์ผ์ผ์ด ์ธํ ํ๋ ๋ฒ๊ฑฐ๋ก์ด ๊ณผ์ ์ ํ ์ค๋ก ์ค์ด๊ณ ์ถ์ ๋
๋ฌด์์ ํด์ฃผ๋์#
- ๋ฏธ๋ฆฌ ์ค๋น๋ ๋ฐ์ดํฐ ์ธํธ(
fixture)๋ฅผ ๊ณจ๋ผ ์ฑ์ ์ฑ์ ๋ฃ์ต๋๋ค. - ํ์ํ๋ฉด ์ฑ์ฐ๊ธฐ ์ ์ ๊ธฐ์กด ๋ฐ์ดํฐ๋ฅผ ์น ๋น์ฐ๊ณ (reset) ๊นจ๋ํ ์ํ์์ ์์ํฉ๋๋ค.
- ์ํ๋ฉด ๋ฐ์ดํฐ๋ฅผ ์ฑ์ด ๋ค ํด๋น ํ๋ฉด์ผ๋ก ๋ฐ๋ก ์ด๋๊น์ง ํด ์ค๋๋ค.
- ๋ง์ง๋ง์ผ๋ก ๊ทธ ํ๋ฉด์ ์ํ๊ฐ ์ ๋ค์ด์ฐผ๋์ง ์์ฝํด์ ๋ณด์ฌ ์ค๋๋ค(๊ฐ๋ฅํ ๊ฒฝ์ฐ).
์ด๋ป๊ฒ ์ฐ๋์#
/mcp-toolkit seed --fixture=feed_with_10 --route=feed
--fixture(ํ์): ์ฑ์ ๋ฃ์ ๋ฐ์ดํฐ ์ธํธ ์ด๋ฆ (์:feed_with_10= ๊ธ 10๊ฐ์ง๋ฆฌ ํผ๋)--route(์ ํ): ๋ฐ์ดํฐ๋ฅผ ์ฑ์ด ๋ค ์ด๋ํ ํ๋ฉด (์:feed)--reset-first(์ ํ): ์ฑ์ฐ๊ธฐ ์ ์ ๊ธฐ์กด ๋ฐ์ดํฐ๋ฅผ ๋จผ์ ๋น์ธ์ง (๊ธฐ๋ณธ๊ฐ: ์ผ์ง)
์ ์์๋ "๊ธฐ์กด ๋ฐ์ดํฐ๋ฅผ ๋น์ฐ๊ณ โ ๊ธ 10๊ฐ์ง๋ฆฌ ํผ๋๋ฅผ ๊น๊ณ โ ํผ๋ ํ๋ฉด์ผ๋ก ์ด๋" ๊น์ง ํ ๋ฒ์ ํด ์ค๋๋ค.
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
- (์ต์ ์ด ์ผ์ ธ ์์ผ๋ฉด) ๊ธฐ์กด ๋ฐ์ดํฐ๋ฅผ ๊นจ๋ํ๊ฒ ๋น์๋๋ค.
- ๊ณ ๋ฅธ ๋ฐ์ดํฐ ์ธํธ(
fixture)๋ฅผ ์ฑ์ ์ฑ์ ๋ฃ์ต๋๋ค. - (ํ๋ฉด์ ์ง์ ํ์ผ๋ฉด) ๊ทธ ํ๋ฉด์ผ๋ก ์ด๋ํฉ๋๋ค.
- ๊ทธ ํ๋ฉด์ ํต์ฌ ์ํ๊ฐ ์ ๋๋ก ์ฑ์์ก๋์ง ์์ฝํด์ ๋ณด์ฌ ์ค๋๋ค (๊ฐ๋ฅํ ๊ฒฝ์ฐ์ ํํด).
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Parameters#
| Parameter | Required | Description |
|---|---|---|
--fixture | โ | Fixture name (must be in db.seed_fixture's enum) |
--route | โ | If provided, navigates after seeding |
--reset-first | โ | Call db.reset first (default true) |
Behaviour#
1. If reset-first: db.reset
2. db.seed_fixture { name: < fixture > }
3. If route: nav.go_named { name: < route > }
4. Print resulting bloc.dump_state for the route ' s primary BLoC (best-effort)Example#
/mcp-toolkit seed --fixture=feed_with_10 --route=feed[โ] db.reset
[โ] db.seed_fixture(feed_with_10) โ seeded 10 rows
[โ] nav.go_named(feed)
[~] bloc.dump_state(FeedBloc) โ { status: loaded, posts: { length: 10 } }