Avoid top-level composition in tool schemas

This commit is contained in:
wuyang6
2026-05-11 11:51:11 +08:00
parent 0e2a00990f
commit 8cca3793e0
6 changed files with 53 additions and 46 deletions
@@ -1,8 +1,14 @@
{
"type": "object",
"properties": {
"records": {"type": "array"},
"records_path": {"type": "string"},
"records": {
"type": "array",
"description": "Canonical records. Provide exactly one of records or records_path."
},
"records_path": {
"type": "string",
"description": "Path to records JSON/JSONL. Provide exactly one of records or records_path."
},
"output_path": {"type": "string"},
"output_dir": {"type": "string"},
"output_format": {
@@ -13,9 +19,5 @@
"require_validation_ok": {"type": "boolean", "default": true},
"overwrite": {"type": "boolean", "default": true},
"export_table": {"type": "boolean", "default": true}
},
"anyOf": [
{"required": ["records"]},
{"required": ["records_path"]}
]
}
}
@@ -1,15 +1,17 @@
{
"type": "object",
"properties": {
"records": {"type": "array"},
"records_path": {"type": "string"},
"records": {
"type": "array",
"description": "Canonical records. Provide exactly one of records or records_path."
},
"records_path": {
"type": "string",
"description": "Path to records JSON/JSONL. Provide exactly one of records or records_path."
},
"output_path": {"type": "string"},
"output_dir": {"type": "string"},
"require_validation_ok": {"type": "boolean", "default": true},
"overwrite": {"type": "boolean", "default": true}
},
"anyOf": [
{"required": ["records"]},
{"required": ["records_path"]}
]
}
}
@@ -1,8 +1,14 @@
{
"type": "object",
"properties": {
"draft_text": {"type": "string"},
"draft_path": {"type": "string"},
"draft_text": {
"type": "string",
"description": "Dataset draft text. Provide exactly one of draft_text or draft_path."
},
"draft_path": {
"type": "string",
"description": "Path to UTF-8 dataset draft text. Provide exactly one of draft_text or draft_path."
},
"batch_id": {"type": "string", "default": "aabbccdd"},
"source_type": {
"type": "string",
@@ -12,9 +18,5 @@
"base_timestamp": {"type": "integer"},
"timestamp_step_ms": {"type": "integer", "minimum": 1, "default": 60000},
"default_request_id": {"type": "string", "default": "aabbccdd"}
},
"anyOf": [
{"required": ["draft_text"]},
{"required": ["draft_path"]}
]
}
}
@@ -1,11 +1,13 @@
{
"type": "object",
"properties": {
"records": {"type": "array"},
"records_path": {"type": "string"}
},
"anyOf": [
{"required": ["records"]},
{"required": ["records_path"]}
]
"records": {
"type": "array",
"description": "Canonical records. Provide exactly one of records or records_path."
},
"records_path": {
"type": "string",
"description": "Path to records JSON/JSONL. Provide exactly one of records or records_path."
}
}
}