Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

extract_json_from_text

Read-onlyIdempotent

Extract the first valid JSON object or array embedded in chaotic LLM output (surrounded by markdown fences, prose, or explanatory text). Handles ```json blocks and inline JSON.

Input Schema

NameRequiredDescriptionDefault
inputYesRaw text (e.g., LLM output) that may contain a JSON object or array

Output Schema

NameRequiredDescriptionDefault
jsonNo
sourceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "input": "Here:\n```json\n{\"a\":[1,2]}\n```\nthanks"
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "json": {},
      +  "source": {
      +    "type": "string"
      +  }
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.