building-chatgpt-appslisted
Install: claude install-skill aiskillstore/marketplace
# ChatGPT Apps SDK Development Guide
## Overview
Create ChatGPT Apps with interactive widgets that render rich UI inside ChatGPT conversations. Apps combine MCP servers (providing tools) with embedded HTML widgets that communicate via the `window.openai` API.
---
## window.openai API Reference
Widgets communicate with ChatGPT through these APIs:
### sendFollowUpMessage (Recommended for Actions)
Send a follow-up prompt to ChatGPT on behalf of the user:
```javascript
// Trigger a follow-up conversation
if (window.openai?.sendFollowUpMessage) {
await window.openai.sendFollowUpMessage({
prompt: 'Summarize this chapter for me'
});
}
```
**Use for**: Action buttons that suggest next steps (summarize, explain, etc.)
### toolOutput
Send structured data back from widget interactions:
```javascript
// Send data back to ChatGPT
if (window.openai?.toolOutput) {
window.openai.toolOutput({
action: 'chapter_selected',
chapter: 1,
title: 'Introduction'
});
}
```
**Use for**: Selections, form submissions, user choices that feed into tool responses.
### callTool
Call another MCP tool from within a widget:
```javascript
// Call a tool directly
if (window.openai?.callTool) {
await window.openai.callTool({
name: 'read-chapter',
arguments: { chapter: 2 }
});
}
```
**Use for**: Navigation between content, chaining tool calls.
---
## Critical: Button Interactivity Limitations
**Imp