{
  "openapi": "3.1.0",
  "info": {
    "title": "1518 公开能力 API",
    "version": "1.44.18",
    "description": "1518.com 是中文姓名测试、起名改名、公司名测试与公司起名平台；八字、星座、周易、风水、解梦等作为传统文化工具矩阵辅助。 本 OpenAPI 只描述公开、免费、无副作用的只读端点与 MCP 工具端点；付费完整详批、订单、会员、后台接口不在此暴露。全部内容属传统民俗文化参考。",
    "contact": {
      "name": "1518.com",
      "url": "https://www.1518.com/developers"
    },
    "license": {
      "name": "Terms",
      "url": "https://www.1518.com/terms"
    }
  },
  "servers": [
    {
      "url": "https://www.1518.com",
      "description": "生产站点"
    }
  ],
  "tags": [
    {
      "name": "discovery",
      "description": "面向大模型 / Agent 的发现与文档"
    },
    {
      "name": "mcp",
      "description": "MCP 确定性工具端点"
    },
    {
      "name": "sample-report",
      "description": "公开虚构样例报告（JSON / Markdown）"
    }
  ],
  "externalDocs": {
    "description": "开发者与 Agent 编排文档",
    "url": "https://www.1518.com/developers"
  },
  "paths": {
    "/llms.txt": {
      "get": {
        "summary": "面向大模型的站点导读（精简版）",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "summary": "面向大模型的完整站点说明",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent-card.json": {
      "get": {
        "summary": "Agent Card 发现文件",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCard"
                }
              }
            }
          }
        }
      }
    },
    "/agent": {
      "get": {
        "summary": "Agent 说明页（HTML）",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/developers": {
      "get": {
        "summary": "开发者 / Agent 编排文档页（HTML）",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "get": {
        "summary": "MCP 客户端文档页（HTML）",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp": {
      "post": {
        "summary": "MCP 服务器端点（JSON-RPC 2.0，Streamable HTTP）",
        "description": "确定性命理工具集，免费、无副作用、无需鉴权。支持 initialize / ping / tools/list / tools/call。可用工具：analyze_name、bazi_chart、hehun_score、astro_chart、qimen_pan、fengshui_zhai、zeri_good_days、huangli_day、luban_ruler、numerology_number、dream_lookup、shengxiao_by_year、xingzuo_by_date。",
        "tags": [
          "mcp"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 响应",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "202": {
            "description": "通知（无 id）已接收，无响应体"
          }
        }
      }
    },
    "/name/report/example.json": {
      "get": {
        "summary": "公开姓名样例报告（虚构，JSON）",
        "tags": [
          "sample-report"
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SampleReport"
                }
              }
            }
          }
        }
      }
    },
    "/name/report/example.md": {
      "get": {
        "summary": "公开姓名样例报告（虚构，Markdown）",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/company/report/example": {
      "get": {
        "summary": "公开公司名样例报告（虚构，HTML）",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/company/report/example.json": {
      "get": {
        "summary": "公开公司名样例报告（虚构，JSON）",
        "tags": [
          "sample-report"
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SampleReport"
                }
              }
            }
          }
        }
      }
    },
    "/company/report/example.md": {
      "get": {
        "summary": "公开公司名样例报告（虚构，Markdown）",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentCard": {
        "type": "object",
        "description": "A2A 风格 Agent Card；详见 /.well-known/agent-card.json 实际内容。",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "provider": {
            "type": "object"
          },
          "url": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "protocolVersion": {
            "type": "string"
          },
          "capabilities": {
            "type": "object"
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "securitySchemes": {
            "type": "object"
          },
          "security": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "name",
          "description",
          "url",
          "version",
          "skills"
        ]
      },
      "JsonRpcRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "method": {
            "type": "string",
            "examples": [
              "tools/list",
              "tools/call"
            ]
          },
          "params": {
            "type": "object"
          }
        },
        "required": [
          "jsonrpc",
          "method"
        ]
      },
      "JsonRpcResponse": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "type": "object"
          }
        },
        "required": [
          "jsonrpc"
        ]
      },
      "SampleReport": {
        "type": "object",
        "description": "公开虚构样例报告，稳定字段供 Agent 读取。",
        "properties": {
          "reportType": {
            "type": "string",
            "enum": [
              "personal_name_test",
              "company_name_test"
            ]
          },
          "reportId": {
            "type": "string"
          },
          "sample": {
            "const": true
          },
          "subject": {
            "type": "object"
          },
          "scoringVersion": {
            "type": "string"
          },
          "overall": {
            "type": "object",
            "properties": {
              "score": {
                "type": "number"
              },
              "grade": {
                "type": "string"
              },
              "verdict": {
                "type": "string"
              }
            }
          },
          "dimensions": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "summary": {
            "type": "object"
          },
          "methodology": {
            "type": "string"
          },
          "disclaimer": {
            "type": "string"
          },
          "verificationUrl": {
            "type": "string"
          },
          "publishedAt": {
            "type": "string"
          }
        },
        "required": [
          "reportType",
          "reportId",
          "sample",
          "scoringVersion",
          "overall",
          "dimensions",
          "disclaimer",
          "verificationUrl",
          "publishedAt"
        ]
      }
    }
  }
}