Skip to main content

Tips for Developing Custom Actions in ChatGPT

· 3 min read
Lutra AI Team
Building the future of AI infrastructure

Custom actions let ChatGPT call your HTTP endpoints. They are ChatGPT's version of tool access, similar to Model Context Protocol (MCP). However, there are some important things to note while building for ChatGPT custom actions. We share what we learned here to help you design actions that behave well in chat.

Understanding Custom Actions vs MCP

Custom Actions are not the same as Model Context Protocol (MCP) - they actually predate MCP and are closer to raw APIs. While MCP provides a standardized protocol for tool interactions, Custom Actions require direct HTTP endpoints with specific schemas. To use MCP servers with ChatGPT Custom Actions, you need a proxy that translates between the two protocols. MintMCP provides such a proxy to make MCPs compatible with ChatGPT's Custom Actions interface.

Tip 1: Handle the 45‑second action time limit

ChatGPT enforces a 45‑second maximum per action call. If your action calls exceed 45 seconds, you should do the work asynchronously.

  • Action takes ≤45 seconds: return the final result in this call.
  • Action may take >45 seconds: start the work asynchronously, return a small handle (for example, a job ID), and say when to check again (in seconds).

Important: ChatGPT does not auto‑poll or wait. The user must ask to check again, or your backend must poll and return the final result in a later call. You can add instructions to your tool description to prompt the user to check back.

Tip 2: Page results to stay under ChatGPT's response limit

Chat responses have an output cap (≈100,000 characters). When results may exceed it, return a bounded page and signal continuation. Do not rely on the assistant to infer size or paginate.

  • For long lists: Page results to a safe size. Accept a page parameter to request specific page numbers. Include total_pages, current_page, and items_per_page in the response. If you truncate, say so.
  • For binary resources (files, reports, images): Always return a download link, not the content.

Tip 3: Write the tool description for the model

Keep it short (≈140–200 characters). Start with a verb. Use the same nouns users say in chat. Avoid adjectives and backstory. The description helps the model pick the right action; dense prose hurts selection.

Example: "Fetch a customer invoice by ID. Returns totals, status, and a download URL."

Tip 4: Keep argument names familiar

Use the words people say in chat for argument names; avoid acronyms. Give each argument a clear description that says what it is; include a tiny example in that description if useful. Keep descriptions literal—no backstory or adjectives. Accept common conversational chat terms (e.g., "open", "paid", "overdue") and map them to internal codes on your side.

Tip 5: Return informative error messages

When something goes wrong, return a brief, structured error that explains the issue and includes instructions for recovery. For bad input, specify what's missing or unrecognized. For system errors, include details that help with debugging. If a retry is safe (e.g., rate limit or transient failure), include when to try again. Clear error messages help the AI understand how to course correct and retry with proper values.

Need a bridge from MCP to Custom Actions?

MintMCP already handles all these considerations for you. Simply plug in an MCP server on one end, and you get a ChatGPT-compatible Custom Actions endpoint on the other. We've built the necessary protocol translations, authentication, and schema mapping so you don't have to worry about these implementation details. Try MintMCP or schedule a short demo to see how it works.