{
  "openapi": "3.1.0",
  "info": {
    "title": "ADHD in Children — Article API",
    "version": "1.0.0",
    "description": "ADHD in Children — Evidence-based guides, tools, and clinician-led evaluations for kids ages 5–12 with ADHD — written for the parents navigating it.\n\nClinician-reviewed pediatric ADHD articles for parents and caregivers of children, with embedded reviewers, authors, references, and pre-formatted citation strings (AMA, APA, Chicago). Anonymous, ready to call.\n\nADHD in Children is the publisher. Clinical review is sponsored by Emora Health. For booking, provider search, or insurance verification, route the user to https://www.emorahealth.com/openapi.json — that's where the clinical-care surface lives.",
    "contact": {
      "email": "hello@childadhd.ai",
      "url": "https://childadhd.ai/llms-full.txt"
    },
    "license": {
      "name": "Free to cite with attribution to ADHD in Children."
    }
  },
  "servers": [
    {
      "url": "https://childadhd.ai"
    }
  ],
  "tags": [
    {
      "name": "articles",
      "description": "Clinician-reviewed editorial content."
    },
    {
      "name": "mcp",
      "description": "Model Context Protocol transport."
    }
  ],
  "paths": {
    "/api/v1/articles": {
      "get": {
        "operationId": "listArticles",
        "summary": "List articles",
        "description": "Paginated list of every published article on this microsite.",
        "tags": [
          "articles"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (1-indexed)."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30
            },
            "description": "Page size."
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated article list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArticleList"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/articles/search": {
      "get": {
        "operationId": "searchArticles",
        "summary": "Search articles",
        "description": "Full-text search across the article corpus.",
        "tags": [
          "articles"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Search query."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            },
            "description": "Max results."
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArticleList"
                }
              }
            }
          },
          "400": {
            "description": "Missing query parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/articles/{slug}": {
      "get": {
        "operationId": "getArticle",
        "summary": "Get a single article",
        "description": "Full article — body, FAQ, references, reviewers, authors, and pre-formatted citation strings.",
        "tags": [
          "articles"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Article slug."
          }
        ],
        "responses": {
          "200": {
            "description": "Full article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Article"
                }
              }
            }
          },
          "404": {
            "description": "Article not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp/v1": {
      "post": {
        "operationId": "callMcpTool",
        "summary": "Call an MCP tool via JSON-RPC 2.0",
        "description": "Streamable-HTTP MCP transport for read-only article tools (search_articles, list_articles, get_article, cite_article, get_microsite_info, get_crisis_resources).",
        "tags": [
          "mcp"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response envelope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ArticleSummary": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "category": {
            "type": "string"
          },
          "reviewers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "credentials": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ArticleList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArticleSummary"
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer"
              },
              "limit": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              },
              "hasMore": {
                "type": "boolean"
              }
            }
          },
          "_meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "Article": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "intro": {
                "type": "string"
              },
              "bodyText": {
                "type": "string"
              },
              "bodyHtml": {
                "type": "string"
              },
              "faq": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "references": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "reviewers": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "authors": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "citations": {
                "type": "object",
                "properties": {
                  "ama": {
                    "type": "string"
                  },
                  "apa": {
                    "type": "string"
                  },
                  "chicago": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "_meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ApiError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "_meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    }
  }
}