{
  "openapi": "3.1.0",
  "info": {
    "title": "Daniel McGrattan API",
    "version": "1.0.0",
    "description": "Read-only API over the proof ledger behind this site. Every value carries a source note id resolvable at /api/v1/evidence. The same operations are exposed as MCP tools at /api/mcp.",
    "contact": {
      "name": "Daniel McGrattan",
      "email": "info@provena-ai.com",
      "url": "https://www.danielmcgrattan.org"
    }
  },
  "servers": [
    {
      "url": "https://www.danielmcgrattan.org"
    }
  ],
  "externalDocs": {
    "url": "https://www.danielmcgrattan.org/api",
    "description": "Interactive docs"
  },
  "paths": {
    "/api/v1/whoami": {
      "get": {
        "operationId": "whoami",
        "summary": "Who is calling",
        "description": "Echoes the API key the request carried (its id, label and expiry), or says the call is anonymous. Use it to check an agent is wired up.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "whoami"
      }
    },
    "/api/v1/profile": {
      "get": {
        "operationId": "get_profile",
        "summary": "Who Daniel is",
        "description": "Name, company, purpose, the IMMAF record, travel, operating model, contact and headline traction, each with its source note.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "get_profile"
      }
    },
    "/api/v1/projects": {
      "get": {
        "operationId": "list_projects",
        "summary": "Everything built",
        "description": "Every project with its kind, period and one-line description.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "list_projects"
      }
    },
    "/api/v1/projects/{slug}": {
      "get": {
        "operationId": "get_project",
        "summary": "One project in full",
        "description": "What Daniel built, what was hard, what he learned, the results and links, plus the one decision the project is remembered for.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Project slug from list_projects.",
            "schema": {
              "type": "string",
              "description": "Project slug from list_projects.",
              "examples": [
                "verifier"
              ]
            },
            "example": "verifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "get_project"
      }
    },
    "/api/v1/activity": {
      "get": {
        "operationId": "get_commit_activity",
        "summary": "Commit activity",
        "description": "Commit aggregates across every repository: totals, hour of day, per day, the day-by-hour matrix, and the UTC offset per month (which shows where in the world the work happened).",
        "parameters": [
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "description": "Shape of the breakdown. Defaults to summary.",
            "schema": {
              "type": "string",
              "description": "Shape of the breakdown. Defaults to summary.",
              "enum": [
                "summary",
                "hour",
                "day",
                "month_timezone",
                "day_hour"
              ],
              "examples": [
                "month_timezone"
              ]
            },
            "example": "month_timezone"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "get_commit_activity"
      }
    },
    "/api/v1/agents": {
      "get": {
        "operationId": "get_agents",
        "summary": "The team, which is agents",
        "description": "Every job Provena runs, the agent that does it, and the human gate that stays with Daniel.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "get_agents"
      }
    },
    "/api/v1/timeline": {
      "get": {
        "operationId": "get_timeline",
        "summary": "Dated milestones",
        "description": "Verified milestones from the first repository to the reply agent going live.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "get_timeline"
      }
    },
    "/api/v1/results": {
      "get": {
        "operationId": "get_client_results",
        "summary": "Client results",
        "description": "The approved proof lines. The only place a client is named.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "get_client_results"
      }
    },
    "/api/v1/postmortems": {
      "get": {
        "operationId": "get_postmortems",
        "summary": "What went wrong",
        "description": "Dated failures and the fix for each.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "get_postmortems"
      }
    },
    "/api/v1/evidence": {
      "get": {
        "operationId": "get_evidence",
        "summary": "Every source",
        "description": "Every fact the site shows, with value, source, status and date. Pass an id (n07) for one note.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "A note id such as n07. Omit for all.",
            "schema": {
              "type": "string",
              "description": "A note id such as n07. Omit for all.",
              "examples": [
                "n62"
              ]
            },
            "example": "n62"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "get_evidence"
      }
    },
    "/api/v1/search": {
      "get": {
        "operationId": "search",
        "summary": "Search everything",
        "description": "Keyword search across projects, postmortems, agents and purpose. Returns ranked snippets with links.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "What to look for.",
            "schema": {
              "type": "string",
              "description": "What to look for.",
              "examples": [
                "verifier catch-all"
              ]
            },
            "example": "verifier catch-all"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max results, 1 to 20. Default 8.",
            "schema": {
              "type": "integer",
              "description": "Max results, 1 to 20. Default 8.",
              "examples": [
                "5"
              ]
            },
            "example": "5"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "The payload."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "data_generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (If-None-Match matched)"
          },
          "400": {
            "description": "Bad parameter"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mcp-tool": "search"
      }
    }
  }
}