Make a file type searchable
inseam cannot index tab-separated tables (.tsv) well: it sees them as plain text. This example writes a converter
that turns them into Markdown tables, submits it, reviews it, and searches a table. It uses curl against inseam’s
MCP endpoint, so every call is visible. An agent makes the same calls.
You need an API token with search, read, write and connect:
export INSEAM_TOKEN="ias_…"export INSEAM="https://inseam.io"mcp() { curl -s "$INSEAM/mcp" -H "Authorization: Bearer $INSEAM_TOKEN" -H "Content-Type: application/json" \ -H "MCP-Protocol-Version: 2026-07-28" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"$1\",\"arguments\":$2}}" \ | jq '.result.structuredContent'; }1. Look in the registry
Section titled “1. Look in the registry”mcp find_plugins '{"from": "text/tab-separated-values"}'If an entry fits, install it with mcp trial_plugin '{"registry": "<hash>", "name": "TSV tables"}' and skip to
step 5.
2. Write the converter
Section titled “2. Write the converter”Save this as tsv-text.js:
const cells = (line) => line.split("\t").map((c) => c.replace(/\|/g, "\\|").trim());
export default { manifest: { contract: 3, name: "tsv-text", title: "Tab-separated tables as Markdown", description: "Makes .tsv files searchable as Markdown tables.", convert: [{ from: "text/tab-separated-values", to: "text/markdown" }], }, convert({ text }) { const rows = text.split(/\r?\n/).filter((l) => l.trim().length > 0).map(cells); if (rows.length === 0) throw new Error("an empty table"); const width = Math.max(...rows.map((r) => r.length)); const pad = (r) => [...r, ...Array(width - r.length).fill("")]; const line = (r) => "| " + pad(r).join(" | ") + " |"; const head = rows[0]; return { title: head.filter(Boolean).join(", ").slice(0, 120), text: [line(head), line(Array(width).fill("---")), ...rows.slice(1).map(line)].join("\n") + "\n", }; },};The title is the table’s own header row: it comes from the file’s structure, not from a sentence in it.
3. Submit it with an example
Section titled “3. Submit it with an example”mcp trial_plugin "$(jq -n --rawfile code tsv-text.js '{ name: "TSV tables", code: $code, examples: [{ text: "bird\tcount\nheron\t2\n", expect: { contains: ["| bird | count |", "| heron | 2 |"], title: "bird, count" } }]}')"{ "accepted": true, "trial": { "trialId": "tr_…", "state": "queued", "slots": ["convert"], "target": "*", "codeHash": "9c1e…", "next": { "actor": "agent", "tool": "trial_status", … } } }target: "*" means the whole network. Pass "for": "<host id>" for one host.
4. Read the report, then review
Section titled “4. Read the report, then review”mcp trial_status '{"trialId": "tr_…"}' | jq '.trial | {state, checks: [.report.checks[] | {id, status, detail}]}'{ "state": "passed", "checks": [ { "id": "examples", "status": "pass", "detail": "12 calls" }, { "id": "corpus", "status": "pass", "detail": "12 calls" }, { "id": "deterministic", "status": "pass", "detail": "12 calls" }, { "id": "no-network", "status": "pass", "detail": "12 calls" }, { "id": "budget", "status": "pass", "detail": "median 0 ms, slowest 21 ms" }, { "id": "metadata", "status": "pass", "detail": "12 calls" } ] }A failed check lists each problem with at, problem and fix. Fix the file and submit it again with
"replaces": "tr_…".
Get the review’s checklist and the numbered code:
mcp review_plugin '{"trialId": "tr_…"}' | jq -r '.prompt'Answer every check with evidence and line numbers, and add tests aimed at the code’s branches:
mcp review_plugin "$(jq -n --arg hash "9c1e…" '{ trialId: "tr_…", codeHash: $hash, verdict: "approve", summary: "Splits the input on tabs and line breaks and writes a Markdown table of the same cells; nothing else.", checks: [ { id: "faithful", result: "pass", evidence: "The output is the input cells with pipes escaped and rows padded to one width; no text is added.", lines: [1, 13, 15, 16, 20] }, { id: "title-and-tags", result: "pass", evidence: "The title is the header row joined with commas (line 19); there are no tags.", lines: [17, 19] }, { id: "no-added-instructions", result: "pass", evidence: "The code adds only the Markdown pipes and the separator row; no words of its own.", lines: [16, 20] }, { id: "no-state", result: "pass", evidence: "The only module-level binding is the pure function cells on line 1; nothing is assigned at module scope.", lines: [1] }, { id: "deterministic", result: "pass", evidence: "No Date, Math.random or counter: the output is a function of text alone.", lines: [12, 13, 20] }, { id: "bounded-work", result: "pass", evidence: "One pass over the lines and one over the cells; the width is the longest row, so padding is bounded by the input.", lines: [13, 14, 15] }, { id: "options-safe", result: "pass", evidence: "The conversion declares no options and the code never reads input.options.", lines: [9, 12] }, { id: "scan-addressed", result: "pass", evidence: "The scanner reported no findings; the only function the slot calls is convert on line 12.", lines: [12] }, { id: "tests-aimed", result: "pass", evidence: "The tests aim at the empty-table throw, short rows that need padding, and a pipe inside a cell.", lines: [14, 15, 1] } ], tests: [ { text: "\n\n", why: "only blank lines is an empty table and is refused (line 14)" }, { text: "a\tb\tc\nd\n", why: "a short row is padded to the widest row (line 15)" }, { text: "a|b\tc\n", why: "a pipe inside a cell is escaped (line 1)" } ]}')" | jq '.trial | {state, tests: .review.tests.passed}'{ "state": "shadowing", "tests": true }5. Shadow, then live
Section titled “5. Shadow, then live”The converter now runs on up to 50 of your own .tsv files. Nothing is kept. A few seconds later:
mcp trial_status '{"trialId": "tr_…"}' | jq '.trial | {state, shadow: (.report.checks[] | select(.id == "shadow") | .detail)}'{ "state": "installed", "shadow": "this network has no objects of text/tab-separated-values yet; live calls are checked from the first one" }If your network asks a person to install converters, state is awaiting-install and next names the page.
6. Write a table and search it
Section titled “6. Write a table and search it”curl -s -X PUT "$INSEAM/v1/o/pad/agents/me/birds.tsv" -H "Authorization: Bearer $INSEAM_TOKEN" \ -H "Content-Type: text/tab-separated-values" --data-binary $'bird\tcount\nkingfisher\t7\n'
curl -s "$INSEAM/v1/search" -H "Authorization: Bearer $INSEAM_TOKEN" -H "Content-Type: application/json" \ -d '{"q": "kingfisher"}' | jq '.hits[] | {address, title}'{ "address": "inseam://n7q2…/pad/agents/me/birds.tsv", "title": "bird, count" }Replace agents/me with your token’s own folder: the hosts tool returns it as padFolder. Read the table as
Markdown too:
curl -s "$INSEAM/v1/o/pad/agents/me/birds.tsv?as=text%2Fmarkdown" -H "Authorization: Bearer $INSEAM_TOKEN"| bird | count || --- | --- || kingfisher | 7 |- See what is installed and how it does:
mcp plugins '{}'. - Share it: an owner publishes it from Plugins in the app. See extend your network with plugins.