search_report_profile
Search and retrieve multi-criteria report summaries from the Insights Knowledge Base MCP Server. Extract key details like titles, topics, publishers, and matched keywords to analyze and reference reports efficiently.
Instructions
该方法用于查询多条件组合的报告概况。LLM需根据用户输入的消息(user_message)提炼出以下参数。
️⚠️注意:当LLM引用该方法返回的结果时,必须用markdown格式明确、醒目告知用户引自哪篇报告和具体访问地址!
比如“观点引自《Open source technology in the age of AI》
Path
<如果"file_uri"不为空,这里完整填入file_uri>
”
参数:
keywords: List[str] = None, 整篇报告的关键词。
⚠️注意:
- 将每个关键词自动翻译为中英双语
- 例如用户输入"帮我查询下科技上市公司前景哈?" → 应转换为["科技", "technology", "上市公司", "publicly listed company", "前景", "prospect"]
title: str = "", 报告标题包含词。
content: str = "", 报告内容包含词。
publisher: str = "", 报告发布者。
start_date: Optional[datetime] = None, 报告查询开始日期。
end_date: Optional[datetime] = None, 报告查询结束日期。
match_logic: str = "OR", 匹配逻辑。"OR" 或者 "AND",二选一,**优先用 "OR"**。
返回:
results:报告概览
- "file_name": 报告名称
- "topic": 报告主题
- "content": 报告整体摘要
- "published_by": 发布机构
- "published_date": 发布日期
- "file_full_path": 报告存放于本地地址
- "matched_keywords": 匹配关键词组
current_page:当前页码。⚠️当前页码小于总页码时,LLM需在结尾处提示用户可输入“下一页”查询更多记录。
total_pages: 总页数
total_matches: 总匹配记录条数
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | ||
| end_date | No | ||
| keywords | No | ||
| match_logic | No | OR | |
| page_index | No | ||
| publisher | No | ||
| start_date | No | ||
| title | No |
Implementation Reference
- ikb_mcp_server.py:11-66 (handler)Handler function for the 'search_report_profile' MCP tool. Includes registration via @mcp.tool(), input schema via type hints and docstring, and core logic delegating to FileRetriever.@mcp.tool() async def search_report_profile( keywords: List[str] = None, title: str = "", content: str = "", publisher: str = "", start_date: Optional[datetime] = None, end_date: Optional[datetime] = None, match_logic: str = "OR", page_index: int = 1 ): """该方法用于查询多条件组合的报告整体概况。LLM需根据用户输入的消息(user_message)提炼出以下参数。 ️⚠️注意:当LLM引用该方法返回的结果时,必须用markdown格式明确、醒目告知用户引自哪篇报告和具体访问地址! 比如“**观点引自《Open source technology in the age of AI》。(查看完整报告)[<如果"download_url"不为空,填入download_url>]**” !!!注意每份报告单独列举 download_url,不要笼统指向某一个可能不存在的地址。 参数: keywords: List[str] = None, 整篇报告的关键词。 title: str = "", 报告标题包含词。 content: str = "", 报告内容包含词。 publisher: str = "", 报告发布者。 start_date: Optional[datetime] = None, 报告查询开始日期。 end_date: Optional[datetime] = None, 报告查询结束日期。 match_logic: str = "OR", 匹配逻辑。"OR" 或者 "AND",二选一,**优先用 "OR"**。 返回: results:报告概览 - file_name: 报告名称 - topic: 报告主题 - content: 报告整体摘要 - published_by: 发布机构 - published_date: 发布日期 - local_path: 报告存放于本地地址 - download_url: 报告网络链接 - matched_keywords: 匹配关键词组 current_page:当前页码。⚠️当前页码小于总页码时,LLM需在结尾处提示用户可输入“下一页”查询更多记录。 total_pages: 总页数 total_matches: 总匹配记录条数 LLM需将该方法返回结果组织成通畅的语言传达给用户。 """ keywords = [] if not keywords else keywords criteria = SearchCriteria( keywords=keywords, title=title, content=content, publisher=publisher, start_date=start_date, end_date=end_date, match_logic=match_logic, # type: ignore ) retriever = FileRetriever() result = retriever.run(criteria, page_index) return result