diff --git a/agentclaw/app/agent_claw_main/main.py b/agentclaw/app/agent_claw_main/main.py index 9491184..254d9cd 100644 --- a/agentclaw/app/agent_claw_main/main.py +++ b/agentclaw/app/agent_claw_main/main.py @@ -5,8 +5,6 @@ Entrypoint for AgentCore CodeZip deployment. """ import os from strands import Agent, tool -from strands.tools.mcp import MCPClient -from mcp.client.streamable_http import streamablehttp_client from strands.models import BedrockModel from bedrock_agentcore.runtime import BedrockAgentCoreApp @@ -470,13 +468,17 @@ async def main(payload: dict, context): _aws_mcp_client = None _aws_mcp_tools = [] try: + from strands.tools.mcp import MCPClient + from mcp.client.streamable_http import streamablehttp_client _aws_mcp_client = MCPClient( lambda: streamablehttp_client(config.AWS_MCP_URL, auth=_AwsMcpSigV4Auth()) ) _aws_mcp_client.start() _aws_mcp_tools = [_aws_mcp_client] except Exception as _e: - print(f'[main] AWS MCP client failed to start: {_e}') + import traceback + print(f"[main] AWS MCP client failed to start: {type(_e).__name__}: {_e}") + print(traceback.format_exc()) all_tools = base_tools + mcp_clients + _aws_mcp_tools diff --git a/workspace/TOOLS.md b/workspace/TOOLS.md new file mode 100644 index 0000000..84af349 --- /dev/null +++ b/workspace/TOOLS.md @@ -0,0 +1,3 @@ +# Tools + +This file documents available tools for the agent-claw runtime.