Iteration Layer

Four APIs, One Conversation: The Composable Content Pipeline

6 min read

The Glue Code Problem

Every developer who has built a content processing pipeline knows the feeling. The hard part isn’t the extraction logic, or the image transformation, or the PDF generation. The hard part is the 200 lines of plumbing between them: parse the response from API A, map it to the request shape for API B, handle the edge cases, write the retry logic, wire up the error handling.

The business task is “get data from this document and generate a report.” The actual work is three days of integration code that lives in a file no one wants to touch.

This is true even with modern APIs. Better-designed APIs reduce the per-API integration cost. But every new API you chain adds another adapter layer, another response mapping, another failure mode to handle.

What Changes With MCP

MCP — the Model Context Protocol — lets AI assistants call external tools as part of a conversation. This isn’t new. What’s interesting is what happens when the tools are structured enough to be useful across a pipeline, and when they compose naturally.

I’ve been building APIs for document extraction, image transformation, image generation, and document generation. Each one is useful standalone. You can replace your Textract integration, or your Sharp server, or your PDF library. But when I added MCP support, something clicked that wasn’t obvious from the individual API docs: the four tools together cover the complete content processing lifecycle.

Read structured data from a document. Modify an image. Compose a new image from data and assets. Produce a final document. These four operations are a pipeline. And in a conversation, they chain without glue code.

The Shift in What You Actually Do

The conventional workflow for “extract data from this contract and generate a summary PDF” looks like this:

  1. Write an extraction script. Define the schema. Test it against sample documents. Handle the edge cases where the format varies.
  2. Write a generation script. Design the template. Map the extracted fields to the template variables. Handle missing fields gracefully.
  3. Write the orchestration layer. Call extraction, parse the response, call generation with the mapped data, handle errors at each step.
  4. Deploy something to run it.

With MCP tools in an AI assistant, the same task looks like:

“Extract the parties, effective date, term length, and total value from this contract. Then generate a one-page PDF summary with the party names as the headline, a bullet list of the key terms, and the total value prominently at the bottom.”

The assistant calls extract_document, reads the structured result, calls generate_document with the extracted data. Two tool calls. No orchestration script. No deployment.

This isn’t just faster for the task at hand. It changes what you’re willing to attempt. A one-off document processing task that would have taken three hours of scripting becomes a five-minute conversation. You start doing things you would have previously deferred or decided weren’t worth the effort.

The Context Advantage

There’s a subtler benefit that becomes obvious after a few sessions: the assistant holds context across the entire chain.

In production code, data flow is explicit. You parse the extraction response into a struct, map specific fields to the generation request, discard the rest. If you need a field that you didn’t originally plan for, you change the schema, re-run, update the mapping.

In conversation, the assistant holds the full extraction result in context. If the initial image composition doesn’t quite work, you say “move the company name to the upper right and make it larger” — and the assistant adjusts the layer parameters without you needing to re-run the extraction or re-specify the data. It knows what the company name is because it extracted it two messages ago.

This is especially useful during the design phase of a pipeline. You iterate on the output — try a different layout, adjust the styling, add a field you forgot — without touching the upstream extraction. The context acts like a shared memory that the pipeline steps can all read from.

What Four APIs Cover

The four tools in the Iteration Layer MCP server map to distinct operations:

Document Extraction converts unstructured documents into structured JSON. PDFs, images of documents, Word files. You define the schema — the fields you want, their types, any nested arrays for line items or comparable sales. The response includes confidence scores for every field, so you can flag uncertain values before they flow into downstream steps.

Image Transformation operates on existing images. Resize, smart crop with AI object detection, remove background, upscale with an AI model, convert formats, compress to a target file size. Operations chain within a single call — up to 30 in sequence.

Image Generation composes new images from layers. Solid colors, gradients, images from URLs, text with any font, borders and border radii. You specify a canvas size and stack up to 50 layers. The output is a pixel-perfect image at exactly the dimensions and design you specified.

Document Generation produces structured documents from content blocks. PDFs, DOCX, EPUB, PowerPoint. Text, headings, tables, images, QR codes, page breaks — all controlled by a JSON structure, no template language, no intermediate HTML.

Together, these handle the inputs and outputs of most content workflows: take something unstructured, make it structured, compose a visual output, produce a final document.

Where Conversation-Based Pipelines Work Best

I’m not arguing that AI assistant pipelines replace production code. They don’t. When you need to process thousands of documents on a schedule, you write the code, deploy it, and monitor it. The API endpoints are the same; you’re just calling them programmatically instead of conversationally.

But there are two scenarios where conversation-based chaining genuinely wins:

One-off processing. Someone sends you a stack of contracts and asks for a summary table. You’re not going to build a pipeline for this. But you will run through it in a 20-minute Claude Code session — extract each contract, build the table, export a PDF. Done. No script, no deployment, no maintenance burden.

Prototyping production pipelines. The fastest way to figure out the right extraction schema and generation layout is to iterate in conversation. You can test a dozen field configurations in an hour, try different image compositions, see what the output actually looks like before you write a single line of production code. The pipeline you converge on in conversation maps directly to the API calls you’ll write — same endpoints, same parameters, same response shapes. Prototyping in conversation and then graduating to code is a natural progression.

The Broader Pattern

What I find interesting about MCP tools for structured APIs is that it changes the mode of programming. Normally, you work at the instruction level — tell the computer how to do something. With good tools in an AI assistant, you work at the intent level — describe what you want done.

This isn’t unique to content pipelines. But content pipelines are a particularly good fit because the intent is usually clear and the structured tools are precise enough that the assistant can act on it accurately. “Extract the invoice data and generate a summary card” has an obvious mapping to a sequence of API calls. The assistant isn’t guessing at your intent.

The failure mode of intent-level programming is ambiguity. If your instruction is unclear, the assistant makes a reasonable interpretation that isn’t what you wanted. This is why the tools matter as much as the assistant. Tools with precise, well-defined parameters make the gap between intent and instruction smaller.

Get Started

The MCP server is available at https://api.iterationlayer.com/mcp. Add it to Claude Code with:

claude mcp add iterationlayer --transport http https://api.iterationlayer.com/mcp

Or in Cursor’s .cursor/mcp.json:

{
  "mcpServers": {
    "iterationlayer": {
      "type": "http",
      "url": "https://api.iterationlayer.com/mcp"
    }
  }
}

Authentication happens via OAuth in the browser on first use.

Start with a two-step chain — extract data from a document you have on hand, then generate an image or PDF from the result. The docs cover the extraction schema format; the image generation docs cover the layer system. Once you’ve run through one chain in conversation, the patterns become obvious.

Build your first workflow in minutes

Chain our APIs together and ship a complete pipeline before lunch. Free trial credits included — no credit card required.