You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,6 +243,39 @@ As above, this exposes only the specified Actor (`apify/my-actor`) as a tool. No
243
243
>
244
244
> **For production use and stable interfaces, always explicitly specify the `tools` parameter** to ensure your configuration remains consistent across updates.
245
245
246
+
### UI mode configuration
247
+
248
+
The `uiMode` parameter enables OpenAI-specific widget rendering in tool responses. When enabled, tools like `search-actors` return interactive widget responses optimized for OpenAI clients.
249
+
250
+
**Configuring the hosted server:**
251
+
252
+
Enable UI mode using the `ui` query parameter:
253
+
254
+
```
255
+
https://mcp.apify.com?ui=openai
256
+
```
257
+
258
+
You can combine it with other parameters:
259
+
260
+
```
261
+
https://mcp.apify.com?tools=actors,docs&ui=openai
262
+
```
263
+
264
+
**Configuring the CLI:**
265
+
266
+
The CLI can be configured using command-line flags. For example, to enable UI mode:
267
+
268
+
```bash
269
+
npx @apify/actors-mcp-server --uiMode openai
270
+
```
271
+
272
+
You can also set it via the `UI_MODE` environment variable:
273
+
274
+
```bash
275
+
export UI_MODE=openai
276
+
npx @apify/actors-mcp-server
277
+
```
278
+
246
279
### Backward compatibility
247
280
248
281
The v2 configuration preserves backward compatibility with v1 usage. Notes:
@@ -227,4 +230,6 @@ These tools are called **Actors**. They enable you to extract structured data fr
227
230
\`${HelperTools.STORE_SEARCH}\` finds robust and reliable Actors for specific websites; ${RAG_WEB_BROWSER} is a general and versatile web scraping tool.
228
231
- **Dedicated Actor tools (e.g. ${RAG_WEB_BROWSER}) vs ${HelperTools.ACTOR_CALL}:**
229
232
Prefer dedicated tools when available; use \`${HelperTools.ACTOR_CALL}\` only when no specialized tool exists in Apify store.
233
+
- **Async vs sync Actor tools (${HelperTools.ACTOR_CALL} vs ${HelperTools.CALL_ACTOR_WIDGET}):**
234
+
Default to \`${HelperTools.ACTOR_CALL}\` (synchronous, no widget) when the user asks to “run/call” and does not request background/progress/UI. Use \`${HelperTools.CALL_ACTOR_WIDGET}\` only when the user wants background/progress/UI. After starting an async run and obtaining runId, do NOT start another async run—only poll with \`${HelperTools.GET_ACTOR_RUN_STATUS}\` using that runId.
0 commit comments