create_outline
Generate structured PPT outlines from textual content using iFlytek's language model. Supports language customization and optional web-based content enrichment for enhanced presentations.
Instructions
创建PPT大纲。
使用说明:
1. 用于根据文本内容生成PPT大纲。
2. 生成的大纲可用于create_ppt_by_outline工具。
3. 可通过search参数控制是否联网搜索补充内容。
4. 需先设置环境变量AIPPT_APP_ID和AIPPT_API_SECRET。
参数:
- text: 需要生成大纲的内容描述。
- language: 大纲生成的语言,目前支持cn(中文)。
- search: 是否联网搜索,True表示联网搜索补充内容,False表示不联网。
返回:
包含生成的大纲内容的字典。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | cn | |
| search | No | ||
| text | Yes |
Implementation Reference
- src/zwppt_mcp/server.py:175-214 (handler)The handler function for the 'create_outline' tool. Decorated with @mcp.tool(), it defines the input parameters, docstring schema description, and implements the logic by making a POST request to the xfyun API to generate a PPT outline from the provided text.@mcp.tool() def create_outline( ctx: Context, text: str, language: str = "cn", search: bool = False ) -> Dict[str, Any]: """ 创建PPT大纲。 使用说明: 1. 用于根据文本内容生成PPT大纲。 2. 生成的大纲可用于create_ppt_by_outline工具。 3. 可通过search参数控制是否联网搜索补充内容。 4. 需先设置环境变量AIPPT_APP_ID和AIPPT_API_SECRET。 参数: - text: 需要生成大纲的内容描述。 - language: 大纲生成的语言,目前支持cn(中文)。 - search: 是否联网搜索,True表示联网搜索补充内容,False表示不联网。 返回: 包含生成的大纲内容的字典。 """ url = "https://zwapi.xfyun.cn/api/ppt/v2/createOutline" form_data = MultipartEncoder( fields={ "query": text, "language": language, "search": str(search) } ) headers = get_headers(form_data.content_type) response = requests.post(url, data=form_data, headers=headers) if response.status_code != 200: raise Exception(f"调用失败: {response.text}") return response.text