Files
notes/resource/ai/MCP 给 AI 的数据结构.md
Docker7530 6b50219f55 1776654103
2026-04-20 11:01:47 +08:00

2.9 KiB
Raw Permalink Blame History

to AI

{
    "messages": [
        {
            "content": "有哪些工具可以使用",
            "role": "user"
        }
    ],
    "model": "gpt-4.1-mini",
    "stream": false,
    "temperature": 0.7,
    "tools": [
        {
            "type": "function",
            "function": {
                "description": "获取公司雇员信息",
                "name": "JavaSDKMCPClient_getCompanyEmployee",
                "parameters": {
                    "additionalProperties": false,
                    "type": "object",
                    "properties": {
                        "xxxRequest01": {
                            "type": "object",
                            "properties": {
                                "city": {
                                    "type": "string",
                                    "description": "城市名称,如果是中文汉字请先转换为汉语拼音,例如北京:beijing"
                                },
                                "company": {
                                    "type": "object",
                                    "properties": {
                                        "name": {
                                            "type": "string",
                                            "description": "公司名称"
                                        },
                                        "type": {
                                            "type": "string",
                                            "description": "公司类型"
                                        }
                                    },
                                    "required": [
                                        "name",
                                        "type"
                                    ],
                                    "description": "公司信息,如果是中文汉字请先转换为汉语拼音,例如北京:jd/alibaba"
                                }
                            },
                            "required": [
                                "city",
                                "company"
                            ]
                        },
                        "xxxRequest02": {
                            "type": "object",
                            "properties": {
                                "employeeCount": {
                                    "type": "string",
                                    "description": "雇员姓名"
                                }
                            },
                            "required": [
                                "employeeCount"
                            ]
                        }
                    },
                    "required": [
                        "xxxRequest01",
                        "xxxRequest02"
                    ]
                }
            }
        }
    ]
}