{
  "openapi": "3.1.0",
  "info": {
    "title": "Jesse L. Anderson — read-only agent API",
    "version": "0.0.1",
    "description": "Stateless JSON-RPC MCP access to published Markdown. Methods: initialize, ping, tools/list, tools/call. Tools: list_pages, get_page(slug), search(query), get_now. Tool results are MCP text blocks containing serialized page metadata/content or search results. Page records include slug, url, markdown_url, title, description, content_hash (SHA-256 of the complete built Markdown); get_page adds the Markdown body as content. get_now uses a dedicated now page if published, otherwise returns home with its actual slug. Only these read-only content tools are exposed; no prompts, private corpora, transactions or write operations. This documents the existing request/response transport, not SSE or session-based streaming."
  },
  "servers": [
    {
      "url": "https://jesselanderson.com"
    }
  ],
  "paths": {
    "/api/mcp": {
      "get": {
        "summary": "Human-readable API descriptor",
        "responses": {
          "200": {
            "description": "Server name, description and advertised tool names",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name",
                    "description",
                    "tools"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Read-only JSON-RPC MCP request or notification",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/JsonRpcRequest"
                  },
                  {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "$ref": "#/components/schemas/JsonRpcRequest"
                    }
                  }
                ]
              },
              "examples": {
                "initialize": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "initialize",
                    "params": {
                      "protocolVersion": "2024-11-05",
                      "capabilities": {},
                      "clientInfo": {
                        "name": "reader",
                        "version": "1"
                      }
                    }
                  }
                },
                "listTools": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 2,
                    "method": "tools/list"
                  }
                },
                "getPage": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 3,
                    "method": "tools/call",
                    "params": {
                      "name": "get_page",
                      "arguments": {
                        "slug": "home"
                      }
                    }
                  }
                },
                "initializedNotification": {
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "notifications/initialized"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC success/error, or batch excluding notification responses",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/JsonRpcResponse"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/JsonRpcResponse"
                      }
                    }
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted; no response body"
          },
          "400": {
            "description": "Malformed JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp.json": {
      "get": {
        "summary": "MCP discovery with tool schemas and source links",
        "responses": {
          "200": {
            "description": "Read-only server discovery document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "number",
              "null"
            ],
            "description": "Omit for a notification"
          },
          "method": {
            "type": "string"
          },
          "params": {
            "type": "object"
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id"
        ],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          }
        },
        "oneOf": [
          {
            "required": [
              "result"
            ]
          },
          {
            "required": [
              "error"
            ]
          }
        ]
      }
    }
  }
}
