---
title: 'Code Mode for JOY Automart''s agent tools — JOY Automart'
description: 'Developer preview: AI agents write one sandboxed script that chains JOY Automart''s public parts and vehicle tools, from search to a link-only handoff. Read-only; nothing books, pays or bids.'
canonical: 'https://www.joyautomart.com/developers/code-mode'
last_updated: '2026-11-20'
keywords: 'JOY Automart Code Mode, MCP Code Mode, AI agent tools, Cloudflare Workers sandbox, developers'
---

# Code Mode for JOY Automart's agent tools

> Developer preview: AI agents write one sandboxed script that chains JOY Automart's public parts and vehicle tools, from search to a link-only handoff. Read-only; nothing books, pays or bids.

Code Mode for JOY Automart's agent tools is a developer preview and is not live yet. Instead of calling tools one at a time, an AI agent writes a single script that runs in a sandbox, chains search, compare, buying guide and handoff, and returns only the answer.

## How it works

With classic tool calling, every tool result passes back through the model before the next call. Code Mode gives the model two tools, get_types and run_code, so it can write the whole journey as one JavaScript function.

Intermediate results stay inside the sandbox. Only the value the script returns goes back to the model.

## Safety

Each script runs in its own isolated Cloudflare Worker with outbound network access blocked; the JOY tools are the only way out.

Eight tools read public data and the two prepare_* tools only compose links and an enquiry for a person to review. No tool places an order, takes a payment, reserves a car or bids at auction.

Every run is limited by a tool-call cap, a time limit, a CPU limit and size limits on scripts, arguments and results. The sandbox has no keys or cookies.

## Measured figures

In the Worker's own tests against recorded responses, a four-step buyer journey (search, compare, buying guide, handoff) used about 524 estimated tokens of model context with Code Mode, against about 2,318 with plain tool calls: one round trip instead of four.

The Code Mode tool list is 2,108 characters, against 38,504 for the 10 public tools: 94.5% smaller. Token figures are estimates (characters divided by four), not tokeniser counts. Reading the full type definitions once with get_types adds about 31,700 characters.

## Tools

A script can call the same 10 public tools as JOY's MCP server: search_vehicles, get_vehicle, compare_vehicles, search_auctions, get_auction, search_parts, get_part, get_buying_guide, prepare_vehicle_handoff and prepare_part_handoff.

## Access

Code Mode is not yet available. Developers can request access through /customer-service, partners can contact the B2B team at /b2b, and the public MCP server described at /developers can be used today.

- [Developers: MCP server and OpenAPI](/developers)

- [Shop with AI](/shop-with-ai)

- [Customer service](/customer-service)

- [JOY B2B](/b2b)

## Sitemap

- [Agent-readable sitemap](https://www.joyautomart.com/sitemap.md): every public JOY Automart route, grouped by area.
- [XML sitemap](https://www.joyautomart.com/sitemap.xml): crawler sitemap with last-modified dates.

## Related

- [JOY Automart homepage](https://www.joyautomart.com/): Car parts, cars and workshop tools · JOY Automart · Bangladesh..
- [HTML version of this page](https://www.joyautomart.com/developers/code-mode): the same content rendered for browsers.
- [Agent-readable sitemap](https://www.joyautomart.com/sitemap.md): every public route in Markdown.
- [llms.txt](https://www.joyautomart.com/llms.txt): concise discovery document for language models.

## Boundaries

Public discovery resources are read-only and grant no operational authority. Owner and Admin routes, privileged agents, write operations, deployments, financial actions and customer records require authentication and JOY Governance authorization.
