The Powerduck Blog

API engineering, from the spec out

Product updates, engineering notes, and guides for designing, debugging, testing, mocking, and serving MCP tools from one OpenAPI spec.

Browse the guides
openapi 4 min read

Reusable JSON Schema components in OpenAPI: DRY models without $ref spaghetti

Inline every schema and your request and response models drift apart. Extract everything and the document becomes a maze of one-off references. The middle path is a small set of rules for what becomes a component, what stays inline, and how to name and compose it.

Read article
openapi 4 min read

Generate OpenAPI from FastAPI and Django REST without decorating every view

FastAPI puts contracts in annotations; Django REST puts them in serializers and viewsets. A static scanner can recover both without a running server, but the dynamic parts of DRF, external models, source mappings, and runtime choices, must be reported as gaps rather than turned into invented enums.

Read article
a2a 4 min read

A2A vs MCP in 2026: when agents should talk to agents instead of calling tools

MCP connects one agent to tools and data. A2A connects autonomous agents to each other through discoverable, long-lived tasks. They are not competitors; they sit at different layers, and getting the boundary wrong is where agent architectures become unmaintainable.

Read article
LLM 4 min read

LLM Structured Outputs and JSON Schema: Tool Calling That Never Drifts

Free-form tool arguments are where agent workflows break: the model invents fields, sends numbers as strings, and omits required values. Structured outputs backed by strict JSON Schema make tool calls deterministic, and most of that schema already exists in your OpenAPI components.

Read article
mcp 4 min read

One MCP Gateway for All Your Internal APIs: The Aggregation Pattern

Pointing an agent at forty internal MCP servers breaks tool limits and buries it in duplicated names. The pattern that works at scale is one authenticated gateway that aggregates specs, namespaces the tools, and keeps auth, logging, and rate limits in one place.

Read article
mcp 4 min read

MCP Security in Practice: Prompt Injection, Least Privilege, and Audit Logs

MCP turns external content into actions: a tool description or API response is text the model reads and trusts, which makes indirect prompt injection a real attack path. Here is a practical threat model and the controls that actually work, from scoped tokens to human-in-the-loop and audit logs.

Read article