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
Expected loaded tools with deeply nested objects in the tool spec to preserve the nesting.
Actual Behavior
Deeply nested object structures are not preserved, leading to context loss in the specification provided to the model during inference.
Additional Context
Example provided tool spec:
{
"name": "generate_income_assessment",
"description": "Generate an income assessment report",
"inputSchema": {
"json": {
"type": "object",
"required": [
"application_id",
"assessment_type",
"assessment_criteria"
],
"properties": {
"application_id": {
"type": "string",
"description": "The ID of the application being assessed"
},
"assessment_type": {
"type": "string",
"description": "Type of assessment being performed",
"const": "INCOME"
},
"assessment_criteria": {
"type": "object",
"required": [
"verify_application_document",
"verify_payslip_document",
"verify_bank_statements",
"verify_employer_matches",
"verify_salary_matches"
],
"properties": {
"verify_application_document": {
"type": "object",
"properties": {
"question": {
"const": "Verify application document is present",
"description": "A specific evaluation criteria that must be assessed as part of the income verification process"
},
"result": {
"type": "string",
"enum": ["PASS", "FAIL", "UNKNOWN"],
"description": "The outcome of the assessment check: PASS indicates criteria are met, FAIL indicates criteria are not met, or UNKNOWN if insufficient information is available"
},
"explanation": {
"type": "string",
"description": "A concise justification supporting the result, including evidence and reasoning"
}
},
"required": ["question", "result", "explanation"]
},
"verify_payslip_document": {
"type": "object",
"properties": {
"question": {
"const": "Verify payslip document is present",
"description": "A specific evaluation criteria that must be assessed as part of the income verification process"
},
"result": {
"type": "string",
"enum": ["PASS", "FAIL", "UNKNOWN"],
"description": "The outcome of the assessment check: PASS indicates criteria are met, FAIL indicates criteria are not met, or UNKNOWN if insufficient information is available"
},
"explanation": {
"type": "string",
"description": "A concise justification supporting the result, including evidence and reasoning"
}
},
"required": ["question", "result", "explanation"]
},
"verify_bank_statements": {
"type": "object",
"properties": {
"question": {
"const": "Verify bank statements are present",
"description": "A specific evaluation criteria that must be assessed as part of the income verification process"
},
"result": {
"type": "string",
"enum": ["PASS", "FAIL", "UNKNOWN"],
"description": "The outcome of the assessment check: PASS indicates criteria are met, FAIL indicates criteria are not met, or UNKNOWN if insufficient information is available"
},
"explanation": {
"type": "string",
"description": "A concise justification supporting the result, including evidence and reasoning"
}
},
"required": ["question", "result", "explanation"]
},
"verify_employer_matches": {
"type": "object",
"properties": {
"question": {
"const": "Verify employer matches across documents",
"description": "A specific evaluation criteria that must be assessed as part of the income verification process"
},
"result": {
"type": "string",
"enum": ["PASS", "FAIL", "UNKNOWN"],
"description": "The outcome of the assessment check: PASS indicates criteria are met, FAIL indicates criteria are not met, or UNKNOWN if insufficient information is available"
},
"explanation": {
"type": "string",
"description": "A concise justification supporting the result, including evidence and reasoning"
}
},
"required": ["question", "result", "explanation"]
},
"verify_salary_matches": {
"type": "object",
"properties": {
"question": {
"const": "Verify salary matches payslip",
"description": "A specific evaluation criteria that must be assessed as part of the income verification process"
},
"result": {
"type": "string",
"enum": ["PASS", "FAIL", "UNKNOWN"],
"description": "The outcome of the assessment check: PASS indicates criteria are met, FAIL indicates criteria are not met, or UNKNOWN if insufficient information is available"
},
"explanation": {
"type": "string",
"description": "A concise justification supporting the result, including evidence and reasoning"
}
},
"required": ["question", "result", "explanation"]
}
},
"additionalProperties": False
}
}
}
}
}
After normalization:
{
"toolSpec": {
"name": "generate_income_assessment",
"description": "Generate an income assessment report",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"application_id": {
"type": "string",
"description": "The ID of the application being assessed"
},
"assessment_type": {
"type": "string",
"description": "Type of assessment being performed"
},
"assessment_criteria": {
"type": "object",
"description": "Property assessment_criteria"
}
},
"required": [
"application_id",
"assessment_type",
"assessment_criteria"
]
}
}
}
}
Possible Solution
Fix tool spec normalization to preserve deeply nested objects.
Related Issues
No response
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Checks
Strands Version
0.1.5
Python Version
3.13.3
Operating System
macOS
Installation Method
pip
Steps to Reproduce
TOOL_SPEC
defined. In the tool spec, include deeply nested objects.Expected Behavior
Expected loaded tools with deeply nested objects in the tool spec to preserve the nesting.
Actual Behavior
Deeply nested object structures are not preserved, leading to context loss in the specification provided to the model during inference.
Additional Context
Example provided tool spec:
After normalization:
Possible Solution
Fix tool spec normalization to preserve deeply nested objects.
Related Issues
No response
The text was updated successfully, but these errors were encountered: