Avoid top-level composition in tool schemas
This commit is contained in:
@@ -437,11 +437,11 @@ def build_data_agent_tools(handlers: Mapping[str, ToolHandler]) -> list[AgentToo
|
||||
'properties': {
|
||||
'draft_text': {
|
||||
'type': 'string',
|
||||
'description': 'Dataset draft text in dataset draft text v1 format.',
|
||||
'description': 'Dataset draft text in dataset draft text v1 format. Provide exactly one of draft_text or draft_path.',
|
||||
},
|
||||
'draft_path': {
|
||||
'type': 'string',
|
||||
'description': 'Path to a UTF-8 dataset draft text file. Prefer this for large drafts.',
|
||||
'description': 'Path to a UTF-8 dataset draft text file. Prefer this for large drafts. Provide exactly one of draft_text or draft_path.',
|
||||
},
|
||||
'batch_id': {
|
||||
'type': 'string',
|
||||
@@ -469,10 +469,6 @@ def build_data_agent_tools(handlers: Mapping[str, ToolHandler]) -> list[AgentToo
|
||||
'description': 'Required for generated data; returned by data_agent_confirm_generation_plan.',
|
||||
},
|
||||
},
|
||||
'anyOf': [
|
||||
{'required': ['draft_text']},
|
||||
{'required': ['draft_path']},
|
||||
],
|
||||
},
|
||||
handler=resolve_handler(handlers, 'data_agent_normalize_dataset_draft', 'data-agent'),
|
||||
),
|
||||
@@ -490,17 +486,13 @@ def build_data_agent_tools(handlers: Mapping[str, ToolHandler]) -> list[AgentToo
|
||||
{'type': 'array'},
|
||||
{'type': 'string'},
|
||||
],
|
||||
'description': 'Canonical records as an array, or a JSON string containing the array.',
|
||||
'description': 'Canonical records as an array, or a JSON string containing the array. Provide exactly one of records or records_path.',
|
||||
},
|
||||
'records_path': {
|
||||
'type': 'string',
|
||||
'description': 'Path to records JSON/JSONL. Prefer this when records are large.',
|
||||
'description': 'Path to records JSON/JSONL. Prefer this when records are large. Provide exactly one of records or records_path.',
|
||||
},
|
||||
},
|
||||
'anyOf': [
|
||||
{'required': ['records']},
|
||||
{'required': ['records_path']},
|
||||
],
|
||||
},
|
||||
handler=resolve_handler(handlers, 'data_agent_validate_dataset_records', 'data-agent'),
|
||||
),
|
||||
@@ -519,11 +511,11 @@ def build_data_agent_tools(handlers: Mapping[str, ToolHandler]) -> list[AgentToo
|
||||
{'type': 'array'},
|
||||
{'type': 'string'},
|
||||
],
|
||||
'description': 'Canonical records as an array, or a JSON string containing the array.',
|
||||
'description': 'Canonical records as an array, or a JSON string containing the array. Provide exactly one of records or records_path.',
|
||||
},
|
||||
'records_path': {
|
||||
'type': 'string',
|
||||
'description': 'Path to records JSON/JSONL. Prefer this when records are large.',
|
||||
'description': 'Path to records JSON/JSONL. Prefer this when records are large. Provide exactly one of records or records_path.',
|
||||
},
|
||||
'output_path': {
|
||||
'type': 'string',
|
||||
@@ -552,10 +544,6 @@ def build_data_agent_tools(handlers: Mapping[str, ToolHandler]) -> list[AgentToo
|
||||
},
|
||||
},
|
||||
'required': ['output_path'],
|
||||
'anyOf': [
|
||||
{'required': ['records']},
|
||||
{'required': ['records_path']},
|
||||
],
|
||||
},
|
||||
handler=resolve_handler(handlers, 'data_agent_export_dataset_records', 'data-agent'),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user