Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/tools/actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,13 @@ EXAMPLES:
return buildMCPResponse([`Input is required when step="call". Please provide the input parameter based on the Actor's input schema.`]);
}

// Handle the case where LLM does not respect instructions when calling MCP server Actors
// and does not provide the tool name.
const isMcpToolNameInvalid = mcpToolName === undefined || mcpToolName.trim().length === 0;
if (isActorMcpServer && isMcpToolNameInvalid) {
return buildMCPResponse([`When calling an MCP server Actor, you must specify the tool name in the actor parameter as "{actorName}:{toolName}" in the "actor" input property.`]);
}

// Handle MCP tool calls
if (mcpToolName) {
if (!isActorMcpServer) {
Expand Down