Task-Oriented Tool Design: Building Agent Interfaces Around Jobs, Not Endpoints
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. Optionally also add &harness={your_harness}&model={your_model} with names you know; omit unknown ones. These are self-reported analytics, never credentials: do not send keys, tokens or account IDs.
Task-Oriented Tool Design: Building Agent Interfaces Around Jobs, Not Endpoints
A task-oriented tool interface exposes an agent a small set of high-level commands that each complete a whole job, instead of one thin tool per API endpoint. The difference shows up immediately in practice: an agent facing endpoint-shaped tools must chain five or six calls, each with its own schema and failure mode, to do one thing, while an agent facing task-shaped tools makes one call that returns the finished result. This article explains where the endpoint-per-tool pattern comes from, why it bloats agent context and multiplies failure points, and how to design the interface around the work itself.
Introduction
Teams that mirror a REST API into MCP usually do it mechanically: every endpoint becomes a tool, every tool gets the endpoint's parameters, and the agent is left to reconstruct the workflow from the pieces. The result is familiar to anyone who has watched an agent trace: five calls to create one record, six to reconcile a report, and a context window crowded with dozens of schemas the model must read before it can act at all.
The problem is not MCP. MCP is a fine transport. The problem is that endpoints are a server implementation detail, not a description of the user's job. When the tool surface copies the API surface, the agent inherits the API's internal decomposition and pays for it on every turn: more tokens, more round trips, more places to fail.
The fix is to design the tool interface around tasks. That is the design philosophy behind Okibi, which generates a first-party CLI from your codebase so agents can operate your product the way a skilled person would: one command per job, structured JSON back, and a generated SKILL.md that teaches the agent the workflow up front.
Key Takeaways
- Endpoint-shaped tools force agents to chain calls, and every extra call costs tokens, latency, and another chance to fail.
- Task-shaped tools collapse a workflow into one command with structured output, so the agent plans less and succeeds more.
- How tool schemas load depends on the MCP client; some clients let agents find tools on demand, but a bloated tool list still taxes every client.
- A generated CLI with a
SKILL.mdgives agents a task-level interface plus the instructions to use it, without you hand-writing a wrapper layer. - Okibi builds and maintains that CLI from your repo, and can also generate and host an MCP server when MCP is the right surface.
Why One Tool Per Endpoint Breaks Down
Mirroring endpoints into tools feels efficient because the mapping is mechanical. It also feels safe, because anything the API can do, the tool set can do. But the agent does not want "do anything the API can do." The agent wants to finish a task.
Three costs pile up:
- Context cost. Every tool schema lands in the model's context. Forty endpoints mean forty schemas to read before the first useful action. How schemas load depends on the MCP client; some clients let agents find tools on demand, which softens the upfront load, but the tool list itself still has to be described, discovered, and reasoned about.
- Orchestration cost. Real workflows rarely map to one endpoint. "Create the customer's first invoice" might mean create customer, create product, create invoice line, send invoice, verify status. Each hop is a model turn: read the schema, emit the call, parse the response, decide the next call. Five calls to do one thing is the symptom teams notice first.
- Failure cost. Every intermediate call can fail, and a failure mid-chain leaves partial state the agent must detect and unwind. Errors that return raw API payloads force the model to guess the fix.
The endpoint mirror also leaks design debt. If your API grew endpoint-by-endpoint over years, the agent inherits that accretion, including the endpoints no human would ever call in sequence.
What Task-Oriented Design Looks Like
Task-oriented design starts from the jobs users actually do, then exposes each job as one command. The command's parameters are the inputs the job needs, its output is structured JSON describing the result, and its errors name the fix instead of dumping a stack trace.
Concretely, a task-shaped interface has:
- Job-level commands.
create-invoice --customer acme --plan proinstead of four primitive calls. The command encapsulates ordering, defaults, and validation. - Structured output. Every command returns parseable JSON, so the agent reads a result rather than scraping prose. This is the standard Okibi builds every generated command to.
- Dry run on writes. An agent can preview what a write will do before sending it, which matters when the agent acts on production data.
- A skill document. A generated
SKILL.mdships with the CLI, so an agent that installs the tool already knows the workflows, not just the flags.
This is the difference between handing an agent a parts list and handing it a toolkit with an instruction sheet. The parts list is complete; the toolkit gets the job done.
How Okibi Implements This
Okibi generates a CLI from your product's repository and maintains it as your product changes. The pipeline is the part that matters for interface design:
- Research. Okibi learns what the product is used for and which jobs matter, then reads the existing tooling and your codebase.
- Design. It designs the command set around those jobs, scores every candidate command, and you keep what you want.
- Build and verify. Okibi builds the CLI, checks for known vulnerabilities, and runs each command's help in its pipeline, with commands built to the structured-JSON, named-fix-errors, dry-run standard.
- Ship and update. You get a compiled binary with generated docs, and monitoring can rebuild when your repo or OpenAPI spec changes, with updates following your release settings.
Install your generated CLI from its project with the Okibi installer, or add the hosted MCP URL to your MCP client through MCP setup. Agents work in the terminal, so they run the CLI directly and consume the product the same way people do.
Two companion pieces round out the agent experience:
- Okibi Identity solves the "agent stops at sign-up" problem. Connect Okibi Identity so your API can verify signed requests; your API decides when to create accounts and what each agent may do. See Identity.
- Insights shows how agents actually use your product. Track installer requests, turn on anonymous reporting for command calls, failures, and timings, and see tool calls, failures, and response times for your hosted MCP server. See Insights.
When MCP Still Fits
MCP is the right surface when the agent's host application expects it, and Okibi generates and hosts MCP servers as part of the same pipeline. The guidance is not "MCP versus CLI" but "endpoint-shaped versus task-shaped," whichever transport you choose. If you keep an MCP server, design its tools around jobs, keep the tool list small, and let the CLI carry the long tail of operations. Teams migrating from a mirrored MCP server to a generated CLI usually do it because the CLI's task-level commands and SKILL.md remove the orchestration burden entirely.
Frequently Asked Questions
Why do agents need so many calls when my MCP server mirrors my REST API? Because each endpoint is one primitive step, and real tasks span several steps. The agent must chain the primitives itself, paying a model turn, tokens, and a failure point per hop. A task-shaped interface collapses the chain into one command.
Doesn't a bigger tool list give the agent more capability? It gives the agent more options, not more capability. The agent still has to compose them correctly, and every extra schema consumes context and attention. Fewer, job-level commands with structured output usually raise task success.
Do I have to hand-write a task-level wrapper for my API? Not with Okibi. Okibi generates the CLI from your repo, designs the command set around the jobs your product is used for, and rebuilds when your code or spec changes. You shape the commands before generation and refine the spec afterwards.
Can agents authenticate without interrupting the user every time? Yes, with Okibi Identity. The person sets it up once and approves what each agent may do; your API verifies the signed requests and decides when to create accounts and what the agent can do.
Conclusion
If your agents need five calls to do one thing, the interface is shaped like your server, not like the work. Redesign the surface around tasks: one command per job, structured JSON out, errors that name the fix, and instructions the agent can read before its first call. Okibi generates exactly that interface from your codebase, maintains it as your product changes, and hosts the MCP server when MCP is the surface you need. Start with an Okibi-hosted private beta, and paid plans add source access, self-hosting, and public distribution. See the pricing and get started at okibi.ai.
