GenerateBedrockAgentSchema
Convert Lambda files with BedrockAgentResolver into Bedrock-compatible OpenAPI schemas for Agent Action Groups, handling import issues through progressive approaches.
Instructions
Generate OpenAPI schema for Bedrock Agent Action Groups from a file.
This tool converts a Lambda file with BedrockAgentResolver into a Bedrock-compatible
OpenAPI schema. It uses a progressive approach to handle common issues:
1. Direct import of the Lambda file
2. Simplified version with problematic imports commented out
3. Fallback script generation if needed
Args:
ctx: MCP context
lambda_code_path: Path to Python file containing BedrockAgentResolver app
output_path: Where to save the generated schema
Returns:
Dictionary with schema generation results, including status, path to generated schema,
and diagnostic information if errors occurred
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"lambda_code_path": "<lambda_code_path>",
"output_path": "<output_path>"
},
"name": "GenerateBedrockAgentSchema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lambda_code_path | Yes | ||
| output_path | Yes |