2025-06-25 18:31:47 +08:00

46 lines
1.0 KiB
YAML

openapi: 3.0.0
info:
title: Calculator API
description: 提供加法计算服务
version: 1.0.0
servers:
- url: https://naweigetetest2.hschool.com.cn
paths:
/api/mcp.mcp/call:
post:
operationId: calculate
summary: 执行加法计算
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CalculationRequest'
responses:
'200':
description: SSE流式响应
content:
text/event-stream:
schema:
type: string
components:
schemas:
CalculationRequest:
type: object
properties:
function:
type: string
example: "add"
enum: ["add"]
params:
type: object
properties:
a:
type: number
description: 第一个加数
b:
type: number
description: 第二个加数
required:
- a
- b