> ## Content Index
> Fetch the complete content index at: https://developer-service.blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# Why most MCP servers are bad API wrappers, and how to design tools around workflows
- URL: https://developer-service.blog/why-most-mcp-servers-are-bad-api-wrappers-and-how-to-design-tools-around-workflows/
- Published: 2026-11-23T08:18:35.000Z
- Updated: 2026-11-23T08:18:35.000Z
- Description: Most MCP servers expose one tool per API endpoint. Models pay for that in tokens, round trips, and fragile ID juggling. Design tools around workflows instead.
- Author: Nuno Bispo
- Tags: AI

The most common way a [Model Context Protocol](https://modelcontextprotocol.io/?ref=developer-service.blog) (MCP) server gets built: someone opens the OpenAPI spec, writes one tool per endpoint, and ships it. `get_task`, `list_tasks`, `create_task`, `update_task`, `delete_task`, then the same for projects, sections, labels, comments, and so on down the list.

It works, in the sense that the agent *can* technically do anything the API can do. It’s also usually the wrong design, because an API is built for programs and an MCP server is used by a language model. Programs are fine with hundreds of narrow endpoints, opaque IDs, and dozens of calls in a row. Models do badly with all three.

I’ll use Todoist as a case study. I’ll compare a 1:1 endpoint wrapper with a tool built around what people actually ask for (“plan my day”), and walk through how the agent behaves with each. Nothing here is specific to Todoist. Swap in Jira, Gmail, HubSpot or your own internal API and the principles are the same.

---

## The 1:1 wrapper pattern and what it costs

The idea behind a 1:1 wrapper is reasonable: the API is already designed and documented, so expose it and let the model work it out. The trouble is that “let the model work it out” pushes all of the orchestration onto the slowest, most expensive and least reliable part of your system, an AI model.

**Tool-count bloat:** Every tool’s name, description and JSON schema goes into the model’s context, usually on every turn. Todoist’s public API v1 OpenAPI spec currently lists 94 paths and 124 operations. Map that 1:1 and the model has to pick from 124 tools before it does anything useful. Tool selection gets worse as the list grows, especially when tools have similar names (`get_tasks`, `filter_tasks`, `get_completed_tasks_by_due_date`…).

**Context and token cost:** Big schemas are expensive. They use up context the model could spend on the user’s data, and you pay for them on every request. Same pressure as stuffing a long agent chain with fluff the model never needed; see [Telegraphic Semantic Compression](https://developer-service.blog/telegraphic-semantic-compression-tsc-a-semantic-compression-method-for-llm-contexts/) if you care about cutting tokens without cutting facts.

**Round trips:** A single user intent like “what should I work on today?” turns into a chain: list projects, filter tasks, page through results, fetch details, look up labels. Each step is a full model turn, with its own latency, cost and chance to go wrong.

**The model becomes the orchestrator:** Joining tasks to projects, sorting by priority, spotting overdue work, staying under a time budget: that’s ordinary deterministic code. In a 1:1 design the model does it in its head, over JSON it has to read token by token. Give an agent a goal and too many narrow tools and you get the same failure mode as an [unconstrained agent with too much rope](https://developer-service.blog/your-next-breach-wont-be-a-hacker-itll-be-an-agent/): it can act, but not safely or repeatably.

**ID juggling:** APIs talk in IDs. Users talk in names. The model has to call `list_projects`, find `"6Jf8VQXxpwv56VQ7"` for “Work”, and carry it correctly through later calls. Every carried ID is a chance to hallucinate or swap one.

**Fragile multi-step sequences:** Mutations that need four calls in order can fail partway through, and the model then has to notice and recover. Usually it doesn’t. It reports success.

**Inconsistent behavior:** Hand the same prompt to the same model on two different days and you can get two different call sequences, with different filters, page sizes and sort logic. That leads to different answers. Your product’s behavior ends up depending on sampling temperature (how randomly the model picks among plausible next tokens).

---

## Grounding it: the real Todoist MCP server

The Todoist MCP server connected to my own AI agent exposes **49 tools**. Don’t memorize this list, just notice the shape: almost everything is `find-` / `add-` / `update-` against a resource.

```text
add-comments, add-filters, add-labels, add-projects, add-reminders, add-sections,
add-tasks, analyze-project-health, complete-tasks, delete-object,
export-project-template, fetch, fetch-object, find-activity, find-comments,
find-completed-tasks, find-filters, find-labels, find-project-collaborators,
find-projects, find-reminders, find-sections, find-tasks, find-tasks-by-date,
get-overview, get-productivity-stats, get-project-activity-stats,
get-project-health, get-user-status, get-workspace-insights,
import-project-template, list-workspaces, manage-assignments,
project-management, project-move, reorder-objects, reschedule-tasks, search,
set-user-status, uncomplete-tasks, update-comments, update-filters,
update-labels, update-projects, update-reminders, update-sections,
update-tasks, user-info, view-attachment

```

The size of the tool definitions:

| Measurement                                     | Value                                                                              |
| ----------------------------------------------- | ---------------------------------------------------------------------------------- |
| Tools                                           | 49                                                                                 |
| Raw tool-list dump (pretty-printed JSON)        | 95,693 bytes                                                                       |
| Name + description + input schema, compact JSON | \~61,500 characters                                                                |
| Rough token estimate (\~4 chars/token)          | **\~15,000 tokens**                                                                |
| Largest single schemas                          | add-reminders (\~3.7 KB), update-tasks (\~3.5 KB), find-completed-tasks (\~3.1 KB) |

So that’s roughly 15k tokens of tool definitions before the user has typed a word. The exact count depends on the tokenizer and on how the client serializes schemas. Treat it as an order of magnitude.

To be fair, this MCP server is **not** a naive 1:1 wrapper. It already does several things I’ll argue for below, which are:

- **Batching:** 14 create/update tools take arrays of up to 25 items (`add-tasks`, `update-tasks`, `add-comments`…). `complete-tasks`, `reschedule-tasks` and `manage-assignments` take up to 50 items.
- **Names instead of IDs, in places:** Nine tools accept the literal string `"inbox"` in place of a project ID. Assignment fields accept “a user ID, name, or email”, and even `"me"`.
- **Model-friendly values:** Priority is `"p1"`–`"p4"`, the way users see it in the app. The raw REST API uses integers where `4` means *highest*, which is exactly the kind of trap a model falls into.
- **Guardrails in descriptions:** `update-tasks` warns that setting `dueString` replaces recurrence and refuses on recurring tasks unless `replaceRecurrence` is true. It points the model to `reschedule-tasks` for moving a task.
- **Dry runs:** `manage-assignments` has a `dryRun` flag.
- **Summaries next to data:** A read-only call to `find-tasks-by-date` returned structured JSON (`tasks`, `totalCount`, `hasMore`, `appliedFilters`) *plus* a short human-readable summary line.
- **Some higher-level tools.** `get-overview`, `get-project-health` and `get-workspace-insights` are already closer to “answers” than “records.”

That’s actually a thoughtful server, even if it’s still mostly organized around **resources** (tasks, projects, labels, reminders) and not around **jobs**.

---

## A pure 1:1 Todoist wrapper

For the comparison below I’ll use a hypothetical *pure* 1:1 wrapper that mirrors the REST endpoints, since that’s what most MCP servers in the wild look like, and then show what workflow tools add on top.

Here’s a trimmed version of what the naive approach might produce. The names follow the REST API:

```text
list_projects        GET    /api/v1/projects
get_project          GET    /api/v1/projects/{id}
list_sections        GET    /api/v1/sections
list_labels          GET    /api/v1/labels
list_tasks           GET    /api/v1/tasks
filter_tasks         GET    /api/v1/tasks/filter?query=...
get_task             GET    /api/v1/tasks/{id}
create_task          POST   /api/v1/tasks
update_task          POST   /api/v1/tasks/{id}
move_task            POST   /api/v1/tasks/{id}/move
close_task           POST   /api/v1/tasks/{id}/close
reopen_task          POST   /api/v1/tasks/{id}/reopen
delete_task          DELETE /api/v1/tasks/{id}
list_comments        GET    /api/v1/comments
create_comment       POST   /api/v1/comments
... (and so on for ~124 operations)

```

Each tool takes IDs, returns raw API objects (often with 20+ fields each), and paginates with cursors. Nothing is wrong with any single tool. The problem shows up in how they have to be combined.

---

## Designing workflow tools

Start from the other end. Don’t ask “what endpoints exist?”. Ask “what do people actually ask a task manager agent to do?”. A practical way to find that list: pull a week of agent traces, support tickets, or the prompts you type yourself, and cluster the verbs. Those clusters are your tool candidates.

For Todoist, a handful of intents cover most real use: plan my day, triage my inbox, do my weekly review. Each one becomes a tool that returns something the model can act on directly. I’ll work one of them end to end.

### `plan_my_day`

Input:

```json
{
  "available_minutes": 300,
  "focus": "work",
  "include_overdue": true,
  "apply": false
}

```

Output, a decision-ready plan and not raw records:

```json
{
  "date": "2026-11-17",
  "summary": "7 tasks due or overdue (2 overdue). Suggested plan uses 270 of 300 minutes; 3 tasks proposed for tomorrow.",
  "plan": [
    {"ref": "t1", "title": "Finish Q4 budget draft", "project": "Work", "priority": "p1", "est_minutes": 90, "reason": "p1, overdue by 2 days"},
    {"ref": "t2", "title": "Review onboarding PR", "project": "Work", "priority": "p2", "est_minutes": 45, "reason": "due today, blocks a teammate"}
  ],
  "defer": [
    {"ref": "t6", "title": "Clean up old Figma files", "to": "2026-11-18", "reason": "p4, does not fit budget"}
  ],
  "warnings": ["'Renew passport' has a deadline in 3 days and no due date"],
  "next_step": "Call plan_my_day with apply=true to reschedule the 3 deferred tasks, or adjust available_minutes."
}

```

*(All tasks in this post are invented examples. When `apply=true`, the same object comes back with an extra `applied` array of per-item `{ref, ok}` / `{ref, ok, error}` results.)*

It uses project **names**, and short `ref` handles the server maps back to IDs, so the model never has to copy long ID strings. It explains *why* each item made the cut, tells the model what to do next, and previews by default: nothing changes until `apply=true`.

### Implementing `plan_my_day` with FastMCP

Here’s an example of how `plan_my_day` sits on top of the [Todoist REST API (v1)](https://developer.todoist.com/api/v1/?ref=developer-service.blog). It’s deliberately simple. The point is where the logic lives, not how clever the scheduling is. [FastMCP](https://gofastmcp.com/?ref=developer-service.blog) is the thin wrapper that turns the function into a tool, I covered the framework basics in [FastMCP - A Smarter Way to Build LLM Toolchains](https://developer-service.blog/fastmcp-a-smarter-way-to-build-llm-toolchains/).

```python
# plan_my_day.py — sketch, not production code
import os, datetime as dt
import httpx
from fastmcp import FastMCP

mcp = FastMCP("todoist-workflows")
API = "https://api.todoist.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['TODOIST_TOKEN']}"}

# REST API priority: 4 = highest. Users (and models) think in p1..p4.
API_TO_P = {4: "p1", 3: "p2", 2: "p3", 1: "p4"}
DEFAULT_MINUTES = {"p1": 60, "p2": 45, "p3": 30, "p4": 20}

def _get_all(client, path, params=None):
    """Follow cursor pagination so the model never has to."""
    params, out = dict(params or {}), []
    while True:
        r = client.get(f"{API}{path}", params=params, headers=HEADERS)
        r.raise_for_status()
        body = r.json()
        out += body["results"]
        if not body.get("next_cursor"):
            return out
        params["cursor"] = body["next_cursor"]

def _minutes(task, p):
    d = task.get("duration")
    if not d:
        return DEFAULT_MINUTES[p]
    if d.get("unit") == "minute":
        return d["amount"]
    if d.get("unit") == "day":
        return d["amount"] * 8 * 60  # rough workday; sketch only
    return DEFAULT_MINUTES[p]

def _plan_reason(r):
    if r["overdue_days"]:
        days = r["overdue_days"]
        return f"{r['priority']}, overdue by {days} day{'s' if days != 1 else ''}"
    return f"{r['priority']}, due today"

@mcp.tool
def plan_my_day(available_minutes: int = 300, focus: str | None = None,
                include_overdue: bool = True, apply: bool = False) -> dict:
    """Build a prioritized plan for today from due and overdue tasks.
    Previews by default; pass apply=true to push deferred tasks to tomorrow.
    `focus` is a project name (e.g. "Work"), not an ID."""
    today = dt.date.today()
    query = "today | overdue" if include_overdue else "today"

    with httpx.Client(timeout=20) as c:
        projects = {p["id"]: p["name"] for p in _get_all(c, "/projects")}
        if focus and focus.lower() not in {n.lower() for n in projects.values()}:
            return {"error": f"Unknown project '{focus}'.",
                    "valid_projects": sorted(projects.values()),
                    "next_step": "Retry with one of valid_projects, or omit focus."}

        tasks = _get_all(c, "/tasks/filter", {"query": query})
        rows = []
        for t in tasks:
            p = API_TO_P[t["priority"]]
            due = dt.date.fromisoformat(t["due"]["date"][:10]) if t.get("due") else today
            proj = projects.get(t["project_id"], "?")
            rows.append({"id": t["id"], "title": t["content"], "project": proj,
                         "priority": p, "overdue_days": max((today - due).days, 0),
                         "recurring": bool((t.get("due") or {}).get("is_recurring")),
                         "est_minutes": _minutes(t, p)})

        # Separate from the plan query: deadlines soon with no due date.
        # Filter string is illustrative — check current Todoist filter docs.
        warnings = []
        for t in _get_all(c, "/tasks/filter",
                          {"query": "deadline before: +4 days & no date"}):
            dl = ((t.get("deadline") or {}).get("date") or "")[:10]
            if not dl:
                continue
            left = (dt.date.fromisoformat(dl) - today).days
            if 0 <= left <= 3:
                warnings.append(
                    f"'{t['content']}' has a deadline in {left} day"
                    f"{'s' if left != 1 else ''} and no due date")

        # Deterministic ranking: focus project, then priority, then most overdue.
        rows.sort(key=lambda r: (focus is not None and r["project"].lower() != focus.lower(),
                                 r["priority"], -r["overdue_days"]))

        plan, defer, used = [], [], 0
        for i, r in enumerate(rows, 1):
            r["ref"] = f"t{i}"
            if used + r["est_minutes"] <= available_minutes or r["priority"] == "p1":
                used += r["est_minutes"]
                plan.append(r)
            else:
                defer.append(r)

        tomorrow = (today + dt.timedelta(days=1)).isoformat()
        applied = []
        if apply:
            for r in defer:
                # Move the date only; don't overwrite a recurring rule.
                if r["recurring"]:
                    applied.append({"ref": r["ref"], "ok": False,
                                    "error": "Recurring task skipped; reschedule it manually."})
                    continue
                resp = c.post(f"{API}/tasks/{r['id']}",
                              json={"due_date": tomorrow}, headers=HEADERS)
                applied.append({"ref": r["ref"], "ok": resp.is_success})

    n_overdue = sum(1 for r in rows if r["overdue_days"] > 0)
    out = {
        "date": today.isoformat(),
        "summary": (f"{len(rows)} tasks due or overdue ({n_overdue} overdue). "
                    f"Suggested plan uses {used} of {available_minutes} minutes; "
                    f"{len(defer)} tasks proposed for tomorrow."),
        "plan": [
            {"ref": r["ref"], "title": r["title"], "project": r["project"],
             "priority": r["priority"], "est_minutes": r["est_minutes"],
             "reason": _plan_reason(r)}
            for r in plan
        ],
        "defer": [
            {"ref": r["ref"], "title": r["title"], "to": tomorrow,
             "reason": f"{r['priority']}, does not fit budget"}
            for r in defer
        ],
        "warnings": warnings,
        "next_step": None if apply else (
            f"Call plan_my_day with apply=true to reschedule the {len(defer)} "
            f"deferred tasks, or adjust available_minutes."
        ),
    }
    if apply:
        out["applied"] = applied  # per-item results; not present on preview
    return out

if __name__ == "__main__":
    mcp.run()

```

That’s about a hundred lines. It covers what a 1:1 agent would need a dozen or more tool calls to approximate: pagination, joining tasks to project names, translating priorities, time-budgeting, a recurrence guard, preview-then-apply, and a structured result with a next step.

---

## Side by side: what the agent actually does

Below are traces for one prompt, as an example. Exact counts depend on the model, the account size and the page sizes.

### “Plan my day”

Same user prompt, two tool surfaces. Counts are illustrative.

![Diagram 1](https://developer-service.blog/content/images/2026/11/mermaid-1-820f8ec5a5.png)

**Pure 1:1 wrapper:**

Roughly **10–15 model turns**, each carrying the full tool list plus a growing pile of raw JSON.

Some typical failure modes:

- **Priority inversion:** The model reads `priority: 4` as “lowest” and buries the most urgent task. (The REST API uses 4 for highest.)
- **Recurrence wiped:** `due_string: "tomorrow"` on a recurring task replaces “every Monday” with a one-off date.
- **Pagination skipped:** The model stops after page 1 and plans with half the tasks.
- **ID mix-ups:** It updates the wrong task because it copied an ID from the wrong row.
- **Partial failure:** Update 3 of 5 errors, and the model says “Done!” anyway.

**Workflow tools:**

Roughly **2–4 turns**. Ranking is deterministic, recurrence is handled in code, pagination is handled in code, and the model only sees titles, names, reasons and short refs.

What can still go wrong: the plan reflects the heuristics of who design the code for the MCP server, which may not match all users taste. That’s a product decision you can test and tune, which beats leaving it to sampling.

---

## Design principles that generalize

**1\. Design around intents, not resources.** Write down the ten things users actually ask for (from traces or tickets, not from the OpenAPI tag list). Each one is a tool candidate. Resources are an implementation detail.

**2\. Return decision-ready summaries, not raw records.** Strip fields the model doesn’t need. Join related data. Add a one-line `summary`, `reasons`, and `warnings`. The live Todoist server pairing JSON with a short text summary is a good instinct. Put that summary on every read tool. Same instinct as [contracts for architecture review](https://developer-service.blog/why-architecture-reviews-need-contracts-not-chat/): shape the artifact before you trust the text.

**3\. Accept names, return handles.** Let the model pass “Work”, “inbox”, “me”, “tomorrow”. Resolve them on the server, and on ambiguity return the candidates. Hand back short refs (`t1`, `t2`) instead of long IDs.

**4\. Batch everything.** If users act on many items at once, the tool should too. The live server’s 25- and 50-item arrays are the right call.

**5\. Preview before mutating.** Default to a dry run (`apply=false`), and make `apply` explicit. This gives the user a natural checkpoint and makes the agent much safer to run unattended.

**6\. Keep the tool surface small.** Fewer, sharper tools beat many overlapping ones. If two tools are often confused, merge them or rename them.

**7\. Write errors that say what to do next.** “400 Bad Request” is useless to a model. “Project ‘Wrok’ not found; valid projects are …; retry with one of them” fixes itself on the next turn. Report per-item results for batches so partial failures can’t be hidden.

**8\. Encode domain traps in code, not in descriptions.** Priority inversion, recurrence wiping and timezone edge cases belong in the server. Warnings in a description are a good fallback (the live server does this well for `dueString`), but code is enforcement and a description is a request.

**9\. Make behavior deterministic where it can be.** Sorting, filtering, pagination and time-budgeting should give the same answer every time. Save the model’s judgment for the parts that need it: wording, asking the user, handling the odd case.

### When 1:1 wrappers are still fine

- **Small APIs.** If there are six endpoints and they map cleanly to intents, you’re done.
- **Power users and developer tools.** Sometimes the user really does want “update this field on that object”.
- **The long tail.** You can’t anticipate every request. Primitive tools are the escape hatch.
- **Early exploration.** Ship primitives, watch what agents actually do with them in your logs, then turn the common sequences into workflow tools.

### The hybrid approach

In practice the best servers have two layers:

- A **small set of workflow tools** (5–10) that cover the common jobs and are what the model reaches for first.
- A **compact set of primitives** (search, get, a batched update, a batched create) for everything else.

Some clients let you load tools dynamically or group them. If yours does, expose the workflow layer by default and the primitives on demand. The live Todoist server is already partway there: it has batch primitives, name resolution and a few insight tools. The missing piece is the top layer, named after what users actually want.

If you want a worked FastMCP server with guardrails on a real host, see [Building an MCP Server for Dokku with FastMCP](https://developer-service.blog/building-an-mcp-server-for-dokku-with-fastmcp/). That post is about the details of implementation. This one is about which tools to expose in the first place.

Workflow tools are only half the stack. The AI agent still needs playbooks for *how* to use them: [skills sit between mega-prompts and one-off chat](https://developer-service.blog/your-teams-ai-doesnt-need-another-mega-prompt-it-needs-skills/). And when the agent itself is a product (retries, typed outputs, failure modes), pick a framework that fails loudly early: [PydanticAI vs LangChain](https://developer-service.blog/pydanticai-vs-langchain-choosing-an-agent-framework-for-production-not-demos/) is the decision guide I use for that.

---

## Conclusion

An MCP server is the interface between someone’s intent and your system. The model is a costly, probabilistic middle layer; keep it out of the main logic. A 1:1 wrapper hands the model your API’s whole surface and asks it to rebuild your product’s workflows on every request, which costs tokens, round trips and reliability.

Try this next: open your current tool list, mark anything named after a noun in your API, and keep only what maps to a verb a user would say out loud. Build those few tools so they take names, return decisions, batch their changes, preview before writing, and explain their own errors.

Keep a small set of primitives for the long tail. Your agent will make fewer calls and fewer mistakes, and it will behave the same way two different days in a row.

---

Follow me on Twitter: [https://twitter.com/DevAsService](https://twitter.com/DevAsService?ref=developer-service.blog)

Follow me on Instagram: [https://www.instagram.com/devasservice/](https://www.instagram.com/devasservice/?ref=developer-service.blog)

Follow me on TikTok: [https://www.tiktok.com/@devasservice](https://www.tiktok.com/@devasservice?ref=developer-service.blog)

Follow me on YouTube: [https://www.youtube.com/@DevAsService](https://www.youtube.com/@DevAsService?ref=developer-service.blog)