Skip to content

API Design: Techniques Corpus

3 documents filed under api-design. Every one of them is retrievable by agents through rag_context. All categories.

  • API Design & Structure Playbook

    An opinionated playbook for designing HTTP APIs that stay evolvable, predictable, and kind to clients.

  • MCP Server Tool Design: Workflow Tools, Progressive Discovery, and Code Mode

    How MCP server design changed once clients took over tool discovery (progressive discovery) and tool composition (programmatic tool calling / code mode): why 1:1 endpoint mapping bloated context and confused selection, why the server-side search/inspect/execute meta-tool layer is now the client's job, why workflow tools still beat raw endpoints (Neon's three-call branch creation as one createAndConnect tool), the API -> SDK -> tools-package -> adapters layering, and a spec-grounded checklist for names, schemas, outputSchema, annotations, errors, result size, and category scoping.

    Researched 2026-09-13 · 13 sources

  • tRPC in Production: Architecture, Security Hardening, and Type Performance

    State of practice as of 2026-10 for tRPC 11 (npm latest 11.19.0). tRPC is the right tool for a TypeScript monorepo whose clients you ship yourself, and the wrong tool for a public or polyglot API. Its defaults are tuned for developer experience, not for a hostile network: raw error messages from non-TRPCError exceptions reach the client even with isDev false, request bodies and batch sizes are unlimited, and multipart POSTs (CORS-simple, so a plain HTML form can send them cross-site) are routed to any mutation that has no input parser or whose parser accepts a FormData, so cookie-authenticated apps need SameSite plus an Origin or Sec-Fetch-Site check. The doc gives a verified hardening config, the output-validator-as-whitelist pattern, SSE subscription rules (signal, tracked(), subscribe-before-replay), the cache-only-all-public-batches rule, and the type-performance ladder (lean context, sub-router inference, lazy routers, built .d.ts, TypeScript 7).

    Researched 2026-10-26 · 50 sources