Generate and load realistic seed data into a Kinetic form
The user wants to populate a Kinetic form with realistic test data. Parse the argument for kapp slug, form slug, and optional record count (default: 25).
mcp__kinetic-platform__connectmcp__kinetic-platform__get_form with kappSlug, formSlug, include=detailsBased on field names, generate appropriate realistic data:
Always verify field names match the form definition exactly. Posting values for fields that don't exist on the form returns HTTP 500 (not 400).
Create apps/<kapp>/seed.mjs (or appropriate location):
// Pattern: pure Node.js, ES module, no npm dependencies
import https from 'https';
const KINETIC_URL = process.env.KINETIC_URL || 'https://your-server.example.com';
const USERNAME = process.env.USERNAME || 'your-username';
const PASSWORD = process.env.PASSWORD || 'your-password';
const KAPP = '{kapp-slug}';
const FORM = '{form-slug}';
const COUNT = parseInt(process.argv[2]) || 25;
const CONCURRENCY = 10;
Promise.allSettledCreated {n}/{total} after each batchcoreState: "Submitted" in POST body (not Draft)*-data.mjs file if >20 records of complex contentasync function cleanup() {
// Paginate FORWARD with pageToken — NOT re-fetching page 1
// (deletion pagination gotcha: re-fetching page 1 misses later pages)
let pageToken = null;
let deleted = 0;
do {
const page = await listSubmissions(KAPP, FORM, 25, pageToken);
if (!page.submissions?.length) break;
// Delete in parallel batches of 10
for (let i = 0; i < page.submissions.length; i += 10) {
const batch = page.submissions.slice(i, i + 10);
await Promise.all(batch.map(s => deleteSubmission(s.id)));
deleted += batch.length;
}
pageToken = page.nextPageToken;
} while (pageToken);
console.log(`Deleted ${deleted} records`);
}
No bulk delete API — only DELETE /submissions/{id} one at a time. Parallel batches of 10 are ~10x faster than sequential.
node seed.mjs # default count
node seed.mjs 50 # custom count
node seed.mjs cleanup # remove seeded data
{values: {...}, coreState: "Submitted"}