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:
Copy file name to clipboardExpand all lines: src/const.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -215,8 +215,11 @@ These tools are called **Actors**. They enable you to extract structured data fr
215
215
216
216
### Tool dependencies
217
217
- \`${HelperTools.ACTOR_CALL}\`:
218
-
- First call with \`step="info"\` or use \`${HelperTools.ACTOR_GET_DETAILS}\` to obtain the Actor’s schema.
218
+
- First call with \`step="info"\` or use \`${HelperTools.ACTOR_GET_DETAILS}\` to obtain the Actor's schema.
219
219
- Then call with \`step="call"\` to execute the Actor.
220
+
- When \`step="call"\`, supports async execution via the \`async\` parameter:
221
+
- When \`async: false\` or not provided (default when UI mode is disabled): Waits for completion and returns results immediately.
222
+
- When \`async: true\` (default when UI mode is enabled): Starts the run and returns immediately with runId. Use \`${HelperTools.ACTOR_RUNS_GET}\` to check status and retrieve results.
220
223
221
224
### Tool disambiguation
222
225
- **${HelperTools.ACTOR_OUTPUT_GET} vs ${HelperTools.DATASET_GET_ITEMS}:**
@@ -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 parameter for ${HelperTools.ACTOR_CALL} (when step="call"):**
234
+
\`${HelperTools.ACTOR_CALL}\` supports async execution via the \`async\` boolean parameter when \`step="call"\`. When \`async: false\` or not provided, waits for completion and returns results (default when UI mode is disabled). When \`async: true\`, starts the run and returns immediately with runId (default when UI mode is enabled). Use \`async: true\` when the user wants background/progress/UI. After starting an async run and obtaining runId, do NOT start another run—only poll with \`${HelperTools.ACTOR_RUNS_GET}\` using that runId.
0 commit comments