extract_json_from_text
Extract clean JSON objects from messy LLM responses by stripping code fences, comments, and surrounding text, returning the first parseable value.
Instructions
Extract and parse a JSON value embedded in messy LLM output. Strips ```json fences, leading/trailing prose, code comments, and tolerates other LLM-isms. Returns the first parseable value and where in the text it started.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Free-form text that contains a JSON value somewhere inside. |