{
  "serverInfo": {
    "name": "claix",
    "version": "1.13.0",
    "title": "Claix",
    "description": "Claix MCP server — controlled database retrieval for AI agents (routes, agents, claix.retrieve.ask against live Postgres). Also document extraction to JSON/Markdown and multi-document Q&A (Claix Ingest). OpenAPI 1.13.0.",
    "websiteUrl": "https://www.claix.dev"
  },
  "icons": [
    {
      "src": "https://www.claix.dev/claix-logo.png",
      "mimeType": "image/png",
      "sizes": "500x500"
    }
  ],
  "authentication": {
    "required": true,
    "schemes": ["apiKey"]
  },
  "instructions": "Claix MCP v1.13.0 — Retrieve first: create routes (claix.routes.*) and agents (claix.agents.*), then ask with claix.retrieve.ask → POST /retrieve/{agent_name}. Answers come from the live database within the tables/columns you allow; every request is traced. Ingest tools: claix.extract.* / claix.agent.* (file + schema_id only; Guardar Datos may return row_id), claix.markdown.* (optional save), claix.multi_document.ask. Auth via x-api-key. No space_id on extract.",
  "tools": [
    {
      "name": "claix.schemas.list",
      "description": "List the Claix schemas available for the authenticated account. Returns id, name, type, schema_definition, is_agent_mode, and agent_definition. Call this first whenever you need a schema_id before claix.extract.* or claix.agent.* tools.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "Optional Claix API key if x-api-key header is not set"
          }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "claix.extract.pdf",
      "description": "Extract structured JSON from a PDF using a Claix pdf-json schema. file + schema_id only. If Guardar Datos (window_context) is on, response may include row_id. No space_id.",
      "inputSchema": {
        "type": "object",
        "required": ["schema_id"],
        "properties": {
          "schema_id": { "type": "string", "format": "uuid" },
          "file_base64": { "type": "string" },
          "file_path": { "type": "string" },
          "filename": { "type": "string" },
          "api_key": { "type": "string" }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "claix.markdown.pdf",
      "description": "Convert PDF to Markdown (POST /api/pdf-markdown). No schema_id. Optional save=true inserts into connected DB using Markdown rules and may return row_id.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "file_base64": { "type": "string" },
          "save": { "type": "boolean" },
          "api_key": { "type": "string" }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "claix.multi_document.ask",
      "description": "Ask up to 5 typed questions across up to 10 documents (POST /multi-document). Multipart field file per document + questions JSON.",
      "inputSchema": {
        "type": "object",
        "required": ["questions", "files"],
        "properties": {
          "questions": { "type": "array" },
          "files": { "type": "array" },
          "api_key": { "type": "string" }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "claix.retrieve.ask",
      "description": "Ask a Retrieve agent (POST /retrieve/{agent_name}). Body { questions }. format required only for razonada agents.",
      "inputSchema": {
        "type": "object",
        "required": ["agent_name", "questions"],
        "properties": {
          "agent_name": { "type": "string" },
          "questions": { "type": "array" },
          "api_key": { "type": "string" }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "claix.routes.create",
      "description": "Create a Retrieve route (POST /routes). Body: { name, description, rules, tables }.",
      "inputSchema": {
        "type": "object",
        "required": ["name", "description", "rules", "tables"],
        "properties": {
          "name": { "type": "string" },
          "description": { "type": "string" },
          "rules": { "type": "string" },
          "tables": { "type": "array" },
          "api_key": { "type": "string" }
        }
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "claix.agents.create",
      "description": "Create a Retrieve agent (POST /agents). Body: { name, slug, description, prompt, routes, response_mode }.",
      "inputSchema": {
        "type": "object",
        "required": ["name", "slug", "description", "prompt", "routes", "response_mode"],
        "properties": {
          "name": { "type": "string" },
          "slug": { "type": "string" },
          "description": { "type": "string" },
          "prompt": { "type": "string" },
          "routes": { "type": "array" },
          "response_mode": { "type": "string", "enum": ["bruto", "razonada"] },
          "api_key": { "type": "string" }
        }
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "claix.agent.pdf",
      "description": "PDF extraction plus Agent mode reasoning. file + schema_id only. Guardar Datos may return row_id.",
      "inputSchema": {
        "type": "object",
        "required": ["schema_id"],
        "properties": {
          "schema_id": { "type": "string", "format": "uuid" },
          "file_base64": { "type": "string" },
          "api_key": { "type": "string" }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "claix.convert.json_to_excel",
      "description": "Convert JSON to Excel .xlsx using a json-excel schema.",
      "inputSchema": {
        "type": "object",
        "required": ["schema_id"],
        "properties": {
          "schema_id": { "type": "string", "format": "uuid" },
          "json_data": {},
          "file_base64": { "type": "string" },
          "api_key": { "type": "string" }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    }
  ],
  "prompts": [
    {
      "name": "workflow.discover-and-extract",
      "description": "Discover schemas and extract JSON from a document using claix.schemas.list and claix.extract.*"
    },
    {
      "name": "workflow.agent-document-analysis",
      "description": "Run claix.agent.* extraction and reasoning on a document"
    },
    {
      "name": "workflow.invoice-pdf",
      "description": "Extract invoice fields from a PDF with claix.extract.pdf"
    },
    {
      "name": "workflow.markdown-save",
      "description": "Convert to Markdown with claix.markdown.* and optional save=true"
    },
    {
      "name": "workflow.multi-document-ask",
      "description": "Ask typed questions across several files with claix.multi_document.ask"
    },
    {
      "name": "workflow.retrieve-ask",
      "description": "Query a Retrieve agent with claix.retrieve.ask"
    }
  ],
  "resources": [
    {
      "uri": "claix://docs/mcp",
      "name": "mcp-documentation",
      "description": "Claix MCP connection guide"
    },
    {
      "uri": "claix://docs/openapi",
      "name": "openapi-spec",
      "description": "OpenAPI specification URL"
    },
    {
      "uri": "claix://docs/tools",
      "name": "tool-catalog",
      "description": "JSON tool catalog"
    }
  ]
}
