I have a simple Automation with a custom agent and a MCP servers tool attached to it through actions. I have tried small/more describing instructions with no success. The automation is in a automation group that has access to the MCP server needed. The MCP server and the tool work correctly in a non Automation chat agent. Please help me understand what am I missing, thanks!
Error:
Execution ended due to an error: {“reason”: “CustomAgent.ResultProcessor.ToolNotAvailable”, “type”: “System”, “message”: “Cannot complete the requested task because the ‘get_invoices’ tool is not available in this session”, “code”: 400}
Hi @Rasmus_S,
Welcome to the Quick Community! Just to get a better idea, could you please provide some more information in regard to how you set up your ‘get_invoices’ action? Since it does not seem to be working only for an automation context, I wonder if this could be occurring due to some connection-related issue between the MCP and the action.
Thank you!
Hi @WLS-Luis! I set up the Automation action through the Add actions dialog (image attached). The get_invoices tool has optional parameters for customer_id and/or payment status, I have tried with and without them with no success.
The MCP server it self is attached to Quick with Integrations →Actions →Model Context Protocol.
Also I have a couple more MCP servers and tools and I got one of the tools working in another Automation instance, with the exact same steps as in this get_invoices case. BUT when I tried to duplicate that Automation (with the duplicate feature on the Automations page) it does not work on the new duplicated Automation!?? So somehow now I have a single Automation instance with a working MCP tool connection, but i cannot replicate that ![]()
Also I asked the Assistant in the Automation to give the configuration of the agent:
“agent_configuration”: {
“agent_name”: “Custom Agent”,
“instruction”: “Get all overdue invoices using the get_invoices tool”,
“agent_mode”: {
“mode”: “pro”,
“description”: “Pro mode - Ideal for complex tasks that involve reasoning and orchestration of multiple tools or actions”
},
“tools”: [
{
“connector_id”: “model_context_protocol”,
“tool_name”: “8c175de1-ba04-44e5-a997-f5bc0d3974e1”,
“q_action_connector_id”: “action_connector_id_504f5dd0a2bc47b9bdad7768a1bbe6e2”
}
],
“outputSchema”: null
},
“workflow_context”: {
“step_number”: 1,
“line_number”: 4,
“display_name”: “Custom agent”,
“description_md_key”: “MD213692bf”,
“has_implementation”: true,
“function_used”: “agents.agents.use_inline_agent”
},
“agent_mode_details”: {
“selected_mode”: “pro”,
“available_modes”: {
“fast”: “Best for simple tasks like summarization, classification, and high-volume automations”,
“pro”: “Ideal for complex tasks that involve reasoning and orchestration of multiple tools or actions”,
“custom”: “Requires a Bedrock Converse connector; allows you to select the specific model you want to use”
},
“managed”: true,
“requires_setup”: false
},
“function_signature”: {
“name”: “agents.agents.use_inline_agent”,
“parameters”: {
“agent_name”: {
“type”: “string”,
“required”: false,
“description”: “An optional name to identify your custom agents”
},
“instruction”: {
“type”: “string”,
“required”: true,
“description”: “Enter instructions for the AI agent to follow. Be clear and specific about what you want the agent to do”
},
“agent_mode”: {
“type”: “dict”,
“required”: true,
“description”: “Pick a preset mode or configure a custom model”
},
“tools”: {
“type”: “array”,
“required”: false,
“description”: “Tools available to the agent”
},
“outputSchema”: {
“type”: “object”,
“required”: false,
“description”: “JSON schema defining the expected output structure”
}
},
“returns”: “JSON output conforming to the provided outputSchema”
},
“tool_configuration”: {
“connector_type”: “model_context_protocol”,
“tool_id”: “8c175de1-ba04-44e5-a997-f5bc0d3974e1”,
“action_connector_reference”: “action_connector_id_504f5dd0a2bc47b9bdad7768a1bbe6e2”,
“expected_tool_name”: “get_invoices”
}
Hi @Rasmus_S,
Thanks for providing that extra context and that is definitely some interesting behavior you are encountering. If possible, could you try recreating the get_invoices tool in a separate Automation instance? If it does work after trying that, please let me know. Although I think as well that the duplicate feature should work for your use case, I wonder if this behavior is occurring due to some bug/error with that specific feature.
hi @Rasmus_S - Thank you for letting us know. I would recommend filing a case with AWS Support where we can dive into the details so that we can help you further. Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!

