tool_data_transformer
POST /tools/tool_data_transformer/run — Extracts structured JSON from raw text using a caller-supplied JSON Schema. Input: {raw_text: string, target_json_schema: object (JSON Schema draft-07)}. Output: {success, extracted_data, extraction_method, validation_passed, error}. extraction_method is one of: 'direct_parse', 'embedded_json', 'regex_extraction'. No LLM involved — pure parsing pipeline. Type coercion applied for integer/number/boolean fields. Works best with flat schemas; deeply nested structures extract less reliably via key-value pass. Cost: $0.0500 USDC per call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw_text | Yes | Unstructured or semi-structured text to extract data from. Examples: API response body, email content, log lines, form submissions, scraped web pages, or any text that contains the values you need. | |
| target_json_schema | Yes | A JSON Schema object describing the expected output structure. Define 'properties' with a 'type' for each field you want extracted, and list required fields under 'required'. Example: {"type": "object", "properties": {"name": {"type": "string"}, "age": {"type": "integer"}}, "required": ["name", "age"]} |