Inspiration

Returns sound simple, but the actual workflow is usually not.

A customer asks, “Can I return this order?”, and suddenly a support operator has to find the order, read the right return policy, check the return window, look at the item condition, compare different resolutions, draft a response, and sometimes prepare an RMA.

We wanted to explore what this workflow would look like if the website was designed not only for humans, but also for AI agents.

Instead of asking an agent to read the page, guess which button to click, and simulate a human user, we wanted the website to expose its real capabilities directly.

That is where WebMCP became a really good fit for the project.


What it does

Returns Desk is a WebMCP-powered returns workspace for small e-commerce teams.

It exposes six WebMCP tools:

  • search_orders
  • get_return_policy
  • check_return_eligibility
  • compare_resolution_options
  • draft_customer_message
  • submit_rma_for_approval

An agent can use these tools to move through a real returns workflow step by step.

For example, a user can ask the agent to find order ORD-1001, check whether it is eligible for return, and compare the available resolution options.

The agent can then call the website tools directly instead of trying to operate the UI like a human.

The main idea is simple:

AI handles the repetitive work, while humans stay in control of important decisions.


How we built it

We built the frontend with React and TypeScript, and deployed the application with Cloudflare Workers.

The WebMCP layer exposes the same business capabilities that already exist in the application, instead of creating a separate demo-only flow.

That means the human-facing UI and the agent-facing tools are connected to the same returns logic.

We also tried to keep the policy and eligibility logic as deterministic as possible.

Instead of asking an LLM to freely interpret every return case, the application uses structured rules such as return windows, final-sale restrictions, item condition, and available resolution options.

For write-related actions, we added an approval boundary so the agent can prepare a request without silently completing a consequential action.


Challenges we ran into

One of the biggest challenges was deciding what should actually become a WebMCP tool.

At first, it is easy to think in terms of UI actions like “click this button” or “open this page”.

But that would miss the point of WebMCP.

We realized the tools should represent meaningful business capabilities instead, such as check_return_eligibility or compare_resolution_options.

Another challenge was deciding where automation should stop.

We wanted the agent to be genuinely useful, but we did not want it to silently perform important write actions.

That led us to separate read and decision-support tools from approval-related actions.

We also had to test the production site in a real WebMCP environment and make sure ChatGPT could actually discover the tools, not just see them in source code.


Accomplishments that we're proud of

We are especially proud that Returns Desk works as both a normal website and an agent-ready website.

A human can still use the UI normally, but an AI agent can discover structured capabilities through WebMCP.

We successfully exposed six WebMCP tools in the production site and verified that they can be discovered through ChatGPT Desktop Site Tools.

We are also proud of the human-in-the-loop design.

The agent can handle order lookup, policy retrieval, eligibility checks, resolution comparison, and preparation work, while important actions still remain reviewable by a human.

Another thing we are proud of is keeping the demo safe and repeatable.

The project uses isolated demo data, so no real payments, refunds, emails, shipments, or customer accounts are affected.


What we learned

The biggest thing we learned is that making a website “AI-ready” is not the same as adding a chatbot.

The more interesting question is:

What capabilities should the website expose so an agent can understand and use it reliably?

WebMCP made us think much more carefully about tool design, schemas, responsibilities, and safety boundaries.

We also learned that a good agent workflow depends heavily on the tools underneath it.

Clear tools make the workflow easier to understand, test, and trust.

This project also helped us connect a lot of engineering pieces together: frontend, backend logic, APIs, structured tools, deployment, and agent interaction.


What's next for Returns Desk

The current version is built around a deterministic demo returns workflow.

The next step would be connecting it to real commerce infrastructure.

Possible future integrations include:

  • Shopify orders and inventory
  • real return and refund systems
  • shipping and return-label providers
  • merchant-configurable return policies
  • customer support platforms
  • richer approval and audit workflows

We would also like to explore more advanced agent workflows where an agent can handle most of the repetitive returns process while keeping merchants informed and in control.

The long-term idea is to make Returns Desk an agent-ready operations layer for e-commerce returns, not just another support dashboard.

Built With

Share this project:

Updates

Submission history