Extract structured data (AI)
extract_dataExtract specified fields from a web page, PDF, or Office file as JSON, using AI. Provide 'fields' plus ONE source: a 'url', a 'pdf' (file_id or base64), or a 'file' (base64 .docx/.xlsx/.csv). Returns a JSON object mapping each field to its value, or null when absent.
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": {
"fields": "<fields>"
},
"name": "extract_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | A file_id from a prior tool result, or a base64-encoded PDF. | ||
| url | No | A public http/https URL to read. | |
| file | No | A base64-encoded .docx, .xlsx or .csv file (converted to text first). | |
| fields | Yes | Field names to extract, e.g. ['invoice total','due date']. |