{"openapi":"3.1.0","info":{"title":"percidian-mcp","version":"0.2.0"},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/icon.png":{"get":{"summary":"Icon","operationId":"icon_icon_png_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/favicon.ico":{"get":{"summary":"Favicon","operationId":"favicon_favicon_ico_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/apple-touch-icon.png":{"get":{"summary":"Apple Touch Icon","operationId":"apple_touch_icon_apple_touch_icon_png_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Connector Landing","operationId":"connector_landing__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"summary":"Oauth Protected Resource","operationId":"oauth_protected_resource__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Oauth Protected Resource  Well Known Oauth Protected Resource Get"}}}}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"summary":"Oauth Protected Resource Mcp","operationId":"oauth_protected_resource_mcp__well_known_oauth_protected_resource_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Oauth Protected Resource Mcp  Well Known Oauth Protected Resource Mcp Get"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"summary":"Oauth Authorization Server","operationId":"oauth_authorization_server__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Oauth Authorization Server  Well Known Oauth Authorization Server Get"}}}}}}},"/.well-known/openid-configuration":{"get":{"summary":"Oidc Config","operationId":"oidc_config__well_known_openid_configuration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Oidc Config  Well Known Openid Configuration Get"}}}}}}},"/v1/query":{"post":{"summary":"Rest Query","description":"Mirror ``query_project`` / ``_query_impl`` from tools/retrieval.py.\n\nForwards to quorum ``POST /api/v1/retrieval/query`` with the caller's\nbearer token.  Body: project_ids, query, k (default 10), doc_ids.","operationId":"rest_query_v1_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Rest Query V1 Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lattice/query":{"post":{"summary":"Rest Lattice Query","description":"Mirror ``query_lattice`` from tools/lattice.py.\n\nForwards to quorum ``POST /api/v1/lattice/query`` with the caller's\nbearer token. Body: project_id, query?, entity_type?, edge_type?,\nlimit (default 25), depth (default 1). Stateless twin of the\n``query_lattice`` MCP tool — for box scripts that need a scripted,\ndeterministic probe set instead of relying on the agent to decide to\ncall the graph turn-by-turn (see m-and-a-rapid-diligence/assets/\ngraph_probe.py in the skills repo).","operationId":"rest_lattice_query_v1_lattice_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatticeQueryBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Rest Lattice Query V1 Lattice Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/retrieve":{"post":{"summary":"Rest Retrieve","description":"Mirror ``retrieve`` from tools/retrieve.py.\n\nForwards to quorum ``POST /api/v1/retrieve`` with the caller's bearer\ntoken. Body: project_id, question, facets?, limit (default 50).\nStateless twin of the ``retrieve`` MCP tool — the typed-evidence door\n(no synthesized answer, no LLM call) for box scripts that need a\nscripted, deterministic evidence fetch instead of relying on the\nagent to decide to call `retrieve` turn-by-turn.","operationId":"rest_retrieve_v1_retrieve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Rest Retrieve V1 Retrieve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents":{"get":{"summary":"Rest List Documents","description":"Mirror ``list_documents`` from tools/vault.py.\n\nForwards to api ``GET /api/v1/documents`` with ``project_id`` query\nparam (and optional status / limit / offset).","operationId":"rest_list_documents_v1_documents_get","parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Rest List Documents V1 Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Rest Upload Document","description":"Mirror the 3-step upload handshake from tools/files.py ``upload_file``.\n\nSteps:\n  1. POST /api/v1/documents/direct-uploads/prepare  (PREPARE_PATH)\n  2. PUT bytes to the presigned S3 URL returned in step 1\n  3. POST /api/v1/documents/direct-uploads/complete (COMPLETE_PATH)\n\n``content_base64`` is base64-decoded to raw bytes for the S3 PUT.\nReturns the document_id and ingestion_status from the completed upload.","operationId":"rest_upload_document_v1_documents_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Rest Upload Document V1 Documents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{document_id}":{"get":{"summary":"Rest Fetch Document","description":"Mirror ``fetch`` from tools/files.py.\n\nCalls api ``GET /api/v1/documents/{id}`` (metadata) then\n``GET /api/v1/documents/{id}/full-text`` (content), and returns a\ncombined response with markdown/text content and a short-lived access URL.","operationId":"rest_fetch_document_v1_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Rest Fetch Document V1 Documents  Document Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}/events":{"post":{"summary":"Rest Emit Run Event","description":"Emit a progress event from the in-box agent to the persisted trail.\n\nThe box agent calls this endpoint with the MCP bearer injected by\n``attach_headers``.  The request is forwarded verbatim to the api at\n``POST /api/v1/runs/{run_id}/events``; the api inserts the row under\nthe bearer's team RLS.\n\nBody: ``{event_type, message, data?}``.","operationId":"rest_emit_run_event_v1_runs__run_id__events_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEventBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Rest Emit Run Event V1 Runs  Run Id  Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}/steering":{"get":{"summary":"Rest Drain Run Steering","description":"Drain pending mid-run user guidance for the in-box agent.\n\nThe box agent calls this at each phase boundary with the MCP bearer\ninjected by ``attach_headers``. Forwarded verbatim to the api at\n``GET /api/v1/runs/{run_id}/steering``, which DRAINS (consumes) and\nreturns the pending guidance under the bearer's team RLS. Returns a JSON\narray (possibly empty) of ``{id, message, created_at}``.","operationId":"rest_drain_run_steering_v1_runs__run_id__steering_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Rest Drain Run Steering V1 Runs  Run Id  Steering Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LatticeQueryBody":{"properties":{"project_id":{"type":"string","title":"Project Id","description":"Project UUID to query. One project per call."},"query":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Query"},"entity_type":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Entity Type"},"edge_type":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Edge Type"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","default":25},"depth":{"type":"integer","maximum":3.0,"minimum":1.0,"title":"Depth","default":1}},"type":"object","required":["project_id"],"title":"LatticeQueryBody"},"QueryBody":{"properties":{"project_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Project Ids"},"query":{"type":"string","minLength":1,"title":"Query"},"k":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"K","default":10},"doc_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Doc Ids"}},"type":"object","required":["project_ids","query"],"title":"QueryBody"},"RetrieveBody":{"properties":{"project_id":{"type":"string","title":"Project Id","description":"Project UUID to retrieve evidence over."},"question":{"type":"string","maxLength":2000,"minLength":1,"title":"Question"},"facets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Facets","description":"Optional explicit facet override: datasets|kg|rag|reports."},"limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Limit","default":50}},"type":"object","required":["project_id","question"],"title":"RetrieveBody"},"RunEventBody":{"properties":{"event_type":{"type":"string","title":"Event Type","description":"phase|step|reasoning|tool|info|error"},"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["event_type","message"],"title":"RunEventBody"},"UploadBody":{"properties":{"project_id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","title":"Project Id","description":"UUID of the target project."},"filename":{"type":"string","maxLength":512,"minLength":1,"title":"Filename","description":"Filename including extension."},"content_base64":{"type":"string","maxLength":34952536,"title":"Content Base64","description":"Base64-encoded file bytes."},"content_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Content Type","description":"MIME type. Defaults to application/octet-stream."}},"type":"object","required":["project_id","filename","content_base64"],"title":"UploadBody"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}