{
  "openapi": "3.1.0",
  "info": {
    "title": "InternetDude — Agent-Discoverable Surface",
    "version": "1.0.0",
    "summary": "Agent-discoverable endpoints for the InternetDude personal site.",
    "description": "Static and dynamic endpoints designed for AI agents evaluating a candidate. Includes JSON Resume, an agent card, an extended LLM-readable profile, and a Model Context Protocol (MCP) endpoint exposing read tools and an intro-request tool.",
    "contact": {
      "name": "InternetDude",
      "email": "tony@internetdude.com",
      "url": "https://internetdude.com"
    },
    "license": {
      "name": "Personal-profile data — agents may parse and cite. No redistribution as a dataset."
    }
  },
  "servers": [
    { "url": "https://internetdude.com", "description": "Production" }
  ],
  "tags": [
    { "name": "discovery", "description": "Static, agent-discoverable artifacts." },
    { "name": "mcp", "description": "Model Context Protocol endpoint." }
  ],
  "paths": {
    "/llms.txt": {
      "get": {
        "tags": ["discovery"],
        "summary": "Short LLM-readable profile",
        "operationId": "getLlmsTxt",
        "responses": {
          "200": {
            "description": "Markdown profile.",
            "content": { "text/markdown": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "tags": ["discovery"],
        "summary": "Extended LLM-readable profile",
        "operationId": "getLlmsFull",
        "responses": {
          "200": {
            "description": "Markdown profile (deeper).",
            "content": { "text/markdown": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/resume.json": {
      "get": {
        "tags": ["discovery"],
        "summary": "JSON Resume",
        "operationId": "getResume",
        "responses": {
          "200": {
            "description": "Resume in JSON Resume schema 1.0.0.",
            "content": {
              "application/json": {
                "schema": { "$ref": "https://jsonresume.org/schema/1.0.0/resume.json" }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent.json": {
      "get": {
        "tags": ["discovery"],
        "summary": "Agent card",
        "operationId": "getAgentCard",
        "responses": {
          "200": {
            "description": "Agent-discoverable profile card.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/AgentCard" }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "tags": ["discovery"],
        "summary": "This OpenAPI document",
        "operationId": "getOpenApi",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 spec.",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/api/mcp": {
      "get": {
        "tags": ["mcp"],
        "summary": "MCP service description (browser-friendly)",
        "operationId": "describeMcp",
        "responses": {
          "200": {
            "description": "Service info, supported methods, and tool catalog.",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      },
      "post": {
        "tags": ["mcp"],
        "summary": "MCP JSON-RPC 2.0 endpoint (Streamable HTTP, stateless)",
        "description": "Send Model Context Protocol JSON-RPC 2.0 requests. Supported methods: initialize, ping, tools/list, tools/call, resources/list, resources/read, prompts/list. The 'request_intro' tool returns a prefilled mailto template; it does not send mail directly.",
        "operationId": "callMcp",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  { "$ref": "#/components/schemas/JsonRpcRequest" },
                  { "type": "array", "items": { "$ref": "#/components/schemas/JsonRpcRequest" } }
                ]
              },
              "examples": {
                "initialize": {
                  "summary": "initialize",
                  "value": {
                    "jsonrpc": "2.0", "id": 1, "method": "initialize",
                    "params": { "protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": { "name": "example-client", "version": "0.1.0" } }
                  }
                },
                "tools_list": {
                  "summary": "tools/list",
                  "value": { "jsonrpc": "2.0", "id": 2, "method": "tools/list" }
                },
                "get_availability": {
                  "summary": "tools/call get_availability",
                  "value": {
                    "jsonrpc": "2.0", "id": 3, "method": "tools/call",
                    "params": { "name": "get_availability", "arguments": {} }
                  }
                },
                "request_intro": {
                  "summary": "tools/call request_intro",
                  "value": {
                    "jsonrpc": "2.0", "id": 4, "method": "tools/call",
                    "params": {
                      "name": "request_intro",
                      "arguments": {
                        "company": "Acme",
                        "engagement_type": "fractional CTO",
                        "scope_summary": "Need senior IC to ship AI-agent product zero to one.",
                        "timeline": "start in 2 weeks",
                        "budget_or_rate_range": "open",
                        "contact_email": "ops@acme.example"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response (single or batch).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    { "$ref": "#/components/schemas/JsonRpcResponse" },
                    { "type": "array", "items": { "$ref": "#/components/schemas/JsonRpcResponse" } }
                  ]
                }
              }
            }
          },
          "202": { "description": "Accepted (notification with no response)." },
          "400": {
            "description": "Parse or validation error.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/JsonRpcResponse" }
              }
            }
          }
        }
      },
      "options": {
        "tags": ["mcp"],
        "summary": "CORS preflight",
        "operationId": "mcpPreflight",
        "responses": { "204": { "description": "No content." } }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentCard": {
        "type": "object",
        "description": "Agent-discoverable profile card. See /.well-known/agent.json for the canonical instance."
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": { "const": "2.0" },
          "id": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "null" }] },
          "method": { "type": "string" },
          "params": { "type": "object" }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": ["jsonrpc", "id"],
        "properties": {
          "jsonrpc": { "const": "2.0" },
          "id": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "null" }] },
          "result": {},
          "error": {
            "type": "object",
            "required": ["code", "message"],
            "properties": {
              "code": { "type": "integer" },
              "message": { "type": "string" },
              "data": {}
            }
          }
        }
      }
    }
  }
}
