惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
博客园_首页
S
SegmentFault 最新的问题
罗磊的独立博客
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
D
Docker
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
V
V2EX
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
腾讯CDC
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Help Net Security
博客园 - Franky
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Four APIs, One Conversation: The Composable Content Pipeline
Iteration La · 2026-04-30 · via DEV Community

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

Enter fullscreen mode Exit fullscreen mode

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

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

Enter fullscreen mode Exit fullscreen mode

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.