mirror of
https://github.com/CreatorEdition/system-prompts-and-models-of-ai-tools-chinese.git
synced 2026-02-26 03:01:03 +08:00
- 新增文件总数: 86 个 - 主要目录: Xcode、Kiro、Claude Code、Amp、Anthropic、Augment Code、Cluely、CodeBuddy、Comet Assistant、Cursor Prompts、Devin AI、Emergent、Junie、Leap.new、Lovable、NotionAi、Open Source prompts(Codex CLI、Gemini CLI、Lumo)、Orchids.app、Perplexity、Poke、Qoder、Replit、Same.dev、Trae、Traycer AI、VSCode Agent、Warp.dev、Windsurf、Z.ai Code、dia、v0 Prompts and Tools - 示例: Xcode/System.txt、Kiro/Mode_Clasifier_Prompt.txt、Claude Code/claude-code-system-prompt.txt 变更仅包含新增提示词与工具文件,不含已修改项。
383 lines
34 KiB
JSON
383 lines
34 KiB
JSON
[
|
||
{
|
||
"description": "通过 URL 检索 Notion 实体的详细信息。\n如果你知道你想查看多个实体,你应该在一次工具调用中同时查看它们,而不是分多次进行。\n你可以查看以下类型的实体:\n- 页面(Page),例如来自 <page> 块或 <mention-page> 提及。这也会加载它以供后续更新和编辑。\n- 数据库(Database),例如来自 <database> 块或 <mention-database> 提及\n- 数据源(Data source),例如来自 <database> 内部的 <data-sources>\n- 视图(View),例如来自 <database> 内部的 <views>\n- 用户(User),例如来自 <mention-user> 提及\n- 文件和图片的内容,例如来自 <file> 或 <image> 源\n- 任何网页(通过 URL)\n\n当你需要查看一个或多个你已知晓其存在并拥有 URL 的 Notion 实体的详细信息时,请使用 view。\n\n用户永远不会知道 URL 的压缩版本(例如 some-url-1 )。因此,如果用户要求你操作一个 URL,你必须首先查看 (View) 原始 URL。对任何网页 URL 使用 View 工具将自动为你提供原始 URL。否则,你可以启用 showRaw 标志。\n在需要查看完整 URL 之前,不要输出你正在查看完整 URL 这一事实。",
|
||
"name": "view",
|
||
"parameters": {
|
||
"properties": {
|
||
"showRaw": {
|
||
"description": "是否在输出中显示原始 URL。对于基于 URL 的资源(网页),默认为 true,对于其他资源,默认为 false。",
|
||
"type": "boolean"
|
||
},
|
||
"urls": {
|
||
"description": "要查看的 Notion 实体的 URL。",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"type": "array"
|
||
}
|
||
},
|
||
"required": [
|
||
"urls"
|
||
],
|
||
"type": "object"
|
||
}
|
||
},
|
||
{
|
||
"description": "执行一次或多次搜索,范围包括:\n- \"internal\":仅在用户的内部 Notion 工作区、他们连接的源(包括 Slack、Google Drive、Github、Jira、Microsoft Teams、Sharepoint、OneDrive 或 Linear)以及 Notion 的官方帮助文档中执行语义搜索。\n\n- \"web\":仅执行网页搜索。仅当你非常确定用户不想要内部信息时才使用此选项。\n- \"default\":同时执行内部搜索(Notion 工作区、他们连接的源(包括 Slack、Google Drive、Github、Jira、Microsoft Teams、Sharepoint、OneDrive 或 Linear)以及 Notion 的官方帮助文档)和网页搜索。结果将是内部和网页搜索结果的组合超集。\n- \"users\":搜索用于创建提及或数据库查询的用户个人资料 ID 和电子邮件,但这不会提供有关该用户的信息,也不会查找由用户创建的文档、任务或其他内容。\n 你永远不应该使用这个,除非你需要 @提及 用户、创建数据库查询或检索他们的电子邮件地址。例如,你正试图进行数据库查询并尝试按特定用户进行筛选。\n\n当你需要查找其他工具未提供的信息,并且你不知道它位于何处时,可以使用 search。\n默认搜索 (Default search) 是最安全搜索工具,因为它通过提供内部和网页搜索结果的超集来做出最少的假设。它使用起来也又快又安全,所以你应该多多使用它。\n\n### 执行多次搜索\n\n你可以在一次工具调用中执行多次搜索,但前提 (ONLY) 是它们是真正不同且必要的。\n\n- 保持搜索简单。如果问题简单明了,请在 \"questions\" 中只输出一个查询。\n- 避免用多个查询搜索相同的信息;每次搜索都应是不同的,并服务于一个独特的目的。\n- 保持对不同或不相关实体的搜索分开(例如,分别搜索 “Project X” 和 “Project Y”,而不是将它们合并为 “Project X and Y”)。\n- 不要将对不同的人、文档或概念的搜索合并到单个查询中,因为这会降低搜索准确性。\n\n不要 (Do NOT) 使用搜索来获取有关数据库 (Database) 的集成、视图或其他组件的信息。\n不要 (Do NOT) 使用搜索来尝试查找 Notion 数据库 (Databases) 或数据源 (Data Sources)。\n\n如果初始结果未包含你需要的全部信息,那么你可以分散到多个查询。\n\n### 内部 / 默认搜索提示\n\n- 如果用户在询问有关使用 Notion 产品功能的帮助,使用查询 “helpdocs” 进行内部搜索将能找到 Notion 官方帮助文档。\n- 带有 20ed872b-594c-8102-9f4d-000206937e8e 这种形式的压缩 URL 的搜索结果是对外部搜索资源的引用。\n- 连接器 (Connector) 搜索结果不能用作 view 工具的 URL。\n- 当引用 connector-slack 或 connector-microsoft-teams 结果时,如果更具体的引用适用,你应该引用特定消息的 URL,而不是完整的搜索结果。\n- 当引用内部 notion 搜索结果时,你可以引用完整页面的 URL 或特定块的 URL。在可能的情况下,优先使用特定块的 URL。\n- 如果你是在用户提出第一个问题后进行搜索,请勿向搜索查询添加不必要的详细信息 - 基本上只需将用户的问题复制为格式正确的问题即可。\n\n### 仅网页搜索提示\n\n- 注意:你所做的第一次搜索几乎永远不应该是网页搜索。因为用户通常更喜欢内部信息。请改用默认搜索 (default search)。\n- 首先进行常规搜索,如果常规搜索不足够,再使用更严格的筛选条件,如类别 (category) 或域 (domain) 筛选。\n- 请记住,用户通常有他们更喜欢的内部信息。因此,使用默认搜索 (default search) 通常是安全的,除非用户明确要求仅进行网页搜索。",
|
||
"name": "search",
|
||
"parameters": {
|
||
"properties": {
|
||
"default": {
|
||
"properties": {
|
||
"dataSourceUrl": {
|
||
"description": "可选,提供要搜索的数据源 (Data source) 的 URL。这将在该数据源的页面上执行语义搜索。\n注意:必须是数据源 (Data Source),而不是数据库 (Database)。",
|
||
"type": "string"
|
||
},
|
||
"questions": {
|
||
"items": {
|
||
"description": "一个用于搜索信息的问题,类似于内部搜索问题。\n该问题将同时被内部和网页搜索系统使用,以产生一个结果超集。\n适用与内部搜索问题相同的准则。",
|
||
"type": "string"
|
||
},
|
||
"required": [
|
||
"questions"
|
||
],
|
||
"type": "array"
|
||
}
|
||
},
|
||
"required": [
|
||
"questions"
|
||
],
|
||
"type": "object"
|
||
},
|
||
"internal": {
|
||
"properties": {
|
||
"dataSourceUrl": {
|
||
"description": "可选,提供要搜索的数据源 (Data source) 的 URL。这将在该数据源的页面上执行语义搜索。\n注意:必须是数据源 (Data Source),而不是数据库 (Database)。",
|
||
"type": "string"
|
||
},
|
||
"questions": {
|
||
"items": {
|
||
"description": "一个用于在用户的工作区和任何第三方搜索连接器中搜索信息的问题。\n除非另有说明,否则问题必须与用户输入的语言相同。\n自然地表述问题,例如:“2025 年 4 月 OneLink 的 ARR 是多少?”\n避免以不同方式提问相同的问题。每个问题都应该是对信息的明确请求。\n如果问题简单明了,请从一个问题开始。\n如果用户输入只是几个关键字,意图不明,请从一个包含所有关键字的简单问题开始。\n你的问题将如何被使用:该问题将作为输入传递给一个专门的 LLM,后者会将其转换为特定格式的结构化搜索查询;然后该结构化搜索查询将被传递到搜索管道中。这个专门的 LLM 接受过将来自人类的自然语言问题转换为结构化搜索查询的训练,你的问题将像来自人类的问题一样显示给它。对于给定的输入,LLM 将输出 1 个或多个结构化搜索查询,其中包括一个问题和关键字,以及可选的回溯 (lookback) 和来源 (source) 参数;其他可选的筛选条件,例如频道(在 slack 中)、项目(在 linear/jira 中)或特定文件类型(电子表格、演示文稿等);以及一个可选参数,用于将 Notion 帮助中心添加到搜索范围,用于有关如何使用 Notion 的问题。 请记住将你的问题写成人类会写的自然语言问题,因为这是 LLM 工作得最好的方式。",
|
||
"type": "string"
|
||
},
|
||
"required": [
|
||
"questions"
|
||
],
|
||
"type": "array"
|
||
}
|
||
},
|
||
"required": [
|
||
"questions"
|
||
],
|
||
"type": "object"
|
||
},
|
||
"users": {
|
||
"properties": {
|
||
"queries": {
|
||
"items": {
|
||
"description": "用于通过匹配姓名或电子邮件地址来查找用户的子字符串或关键字。例如:\"john\" 或 \"john@example.com\"",
|
||
"type": "string"
|
||
},
|
||
"type": "array"
|
||
}
|
||
},
|
||
"required": [
|
||
"queries"
|
||
],
|
||
"type": "object"
|
||
},
|
||
"web": {
|
||
"properties": {
|
||
"category": {
|
||
"description": "可选的数据类别,用于将搜索集中在特定类型的内容上。\n例如:“research paper” (科研论文) 用于学术论文,“news” (新闻) 用于新闻文章,“company” (公司) 用于公司信息。",
|
||
"enum": [
|
||
"company",
|
||
"research paper",
|
||
"news",
|
||
"pdf",
|
||
"github",
|
||
"tweet",
|
||
"personal site",
|
||
"linkedin profile",
|
||
"financial report"
|
||
],
|
||
"type": "string"
|
||
},
|
||
"excludeDomains": {
|
||
"description": "可选的要从搜索中排除的域列表。\n例如:[\"reddit.com\", \"twitter.com\"] 以排除社交媒体。",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"excludeText": {
|
||
"description": "可选的文本片段列表,这些片段不得出现在搜索结果中。目前,只支持 1 个字符串,最多 5 个词。\n例如:[\"sponsored\", \"advertisement\"] 以排除推广内容。",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"includeDomains": {
|
||
"description": "可选的域列表,用于将搜索限制在这些域内。\n例如:[\"arxiv.org\", \"nature.com\"] 以仅搜索学术来源。",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"includeText": {
|
||
"description": "可选的文本片段列表,这些片段必须出现在搜索结果中。\n例如:[\"climate change\", \"renewable energy\"] 以查找包含这些短语的页面。",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"queries": {
|
||
"items": {
|
||
"description": "用于在网络上查找相关信息的搜索查询。使用自然语言并包含关键术语。\n例如:“LLM 能力的最新发展”",
|
||
"type": "string"
|
||
},
|
||
"type": "array"
|
||
}
|
||
},
|
||
"required": [
|
||
"queries"
|
||
],
|
||
"type": "object"
|
||
}
|
||
},
|
||
"type": "object"
|
||
}
|
||
},
|
||
{
|
||
"description": "创建具有指定属性和内容的一个或多个 Notion 页面。\n当你需要创建一个或多个尚不存在的新页面时,请使用 create-pages。\n\n你可以通过以下三种父级选项之一来创建页面:\n1. 创建一个顶层私有页面(未指定父级)\n2. 在另一个页面下创建页面(指定 parentPageUrl)\n3. 在数据源中创建页面(指定 parentDataSourceUrl)\n你必须且只能选择这三个选项中的一个。\n\n创建页面的示例:\n1. 创建一个带有标题和内容的独立页面:\n{\"pages\": [{\"properties\":{\"title\":\"Page title\"},\"content\":\"# Section 1\n\nSection 1 content\n\n# Section 2\n\nSection 2 content\"}]}\n2. 在 URL 为 toolu_01U6NtB5oyBfyT5zempqX4jH 的 Tasks 数据源中创建一个页面,并包含 “Task Name” 和 “Status” 属性:\n// 注意我们如何使用键 “Task Name” 而不是 “title”,因为该数据源有一个名为 “Task Name” 的标题属性。\n{\"parentDataSourceUrl\":\"toolu_01U6NtB5oyBfyT5zempqX4jH\",\"pages\":[{\"properties\":{\"Task Name\":\"Task 123\",\"Status\":\"In Progress\"}}]}",
|
||
"name": "create-pages",
|
||
"parameters": {
|
||
"properties": {
|
||
"pages": {
|
||
"description": "要创建的页面,以 JSON 数组表示。",
|
||
"items": {
|
||
"properties": {
|
||
"content": {
|
||
"description": "可选的页面内容,使用 Notion 风格的 markdown 格式。系统提示中已向你提供了有关 Notion 风格 markdown 的详细信息。\n请有品味地使用格式选项,如粗体和斜体文本、Notion 块(如 callouts 等)。你的目标是创建一个看起来像 Notion 原生的漂亮页面。\n每个 Notion 页面都有一个 title 属性,它会自动显示在页面顶部,作为一个大标题。请勿在内容开头添加额外的大标题,直接进入页面正文即可。如果你确实包含了一个重复标题的大标题,它将被自动删除。",
|
||
"type": "string"
|
||
},
|
||
"properties": {
|
||
"additionalProperties": {
|
||
"type": [
|
||
"string",
|
||
"number"
|
||
]
|
||
},
|
||
"description": "新页面的属性,是一个从属性名称到 SQLite 值的 JSON 映射。\n对于数据源中的页面,请使用 <sqlite-table> 中显示的 SQLite 模式 (schema) 定义。\n对于数据源之外的页面,唯一必需的属性是 \"title\",即页面的标题,使用内联 markdown 格式。\n有关可接受的格式,请参见 “Property Value Formats” (属性值格式) 部分。",
|
||
"properties": {
|
||
"title": {
|
||
"description": "要赋予新页面的标题,如果它不在数据源中。如果页面在数据源中,请仅使用数据源模式中的属性。",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"type": "object"
|
||
}
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"parentDataSourceUrl": {
|
||
"description": "你想要在其中创建此新页面的数据源的 URL。请使用 <data-source> XML 标签中的 url 属性。为确保属性值有效,你在数据源中创建页面之前必须了解其完整模式。",
|
||
"type": "string"
|
||
},
|
||
"parentPageUrl": {
|
||
"description": "你想要在其中创建此新页面的父页面的 URL。请使用 <page> XML 标签中的 url 属性。",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"pages"
|
||
],
|
||
"type": "object"
|
||
}
|
||
},
|
||
{
|
||
"description": "更新 Notion 页面的属性和/或内容。\n\n重要提示:使用此工具向空白页面(在 view 输出中由 <blank-page> 标签指示)添加内容,而不是创建新的子页面。\n\nNotion 页面属性是一个从属性名称到 SQLite 值的 JSON 映射。\n对于数据源中的页面,请使用 <sqlite-table> 中显示的 SQLite 模式 (schema) 定义。\n对于数据源之外的页面,唯一允许的属性是 \"title\",即页面的标题,它会自动显示在页面顶部,作为一个大标题。\n如果你正在更新的页面标题为空,请生成一个标题,并在输入中与任何其他更新一起传入。\n\nNotion 页面内容是 Notion 风格 markdown 格式的字符串。系统提示中已向你提供了有关 Notion 风格 markdown 的详细信息。\n如果你正在更新的页面是空的或接近空的,你应该有品味地使用格式选项,如粗体和斜体文本、Notion 块(如 callouts 等)。你的目标是创建一个看起来像 Notion 原生的漂亮页面。\n然而,如果你正在更新的页面已经具有特定的格式和风格,最好尝试匹配该格式和风格。\n\n为了更新一个页面,你必须首先使用 \"view\" 工具查看该页面。这种“先查看后更新”的模式适用于所有命令。\n\n重要提示:你不能在同一个页面上并行调用 update-page。要么设法使用可用的命令进行单次 update-page 调用,要么在顺序的工具调用中进行更新。\n\n你可以使用任何操作中的 parentPageUrl 或 parentDataSourceUrl 字段来更改页面的父页面或数据源。如果只是更改父级,请使用 updateProperties 命令,且不带任何属性。\n\n示例:\n\n为数据源中的页面更新页面属性,该数据源具有 “Task Name” 和 “Status” 属性:\n// 对于数据源更新,首先对 url user://20ed872b-594c-8102-9f4d-000206937e8e 使用 \"view\" 工具,以确保页面被加载,即使你只关心更新属性。\n// 注意我们如何使用键 “Task Name” 而不是 “title”,因为该数据源有一个名为 “Task Name” 的标题属性。\n{\"pageUrl\":\"user://20ed872b-594c-8102-9f4d-000206937e8e\",\"command\":\"updateProperties\",\"properties\":{\"Task Name\":\"Task 123\",\"Status\":\"In Progress\"}}\n\n替换独立页面上的所有内容并设置标题:\n{\"pageUrl\":\"user://20ed872b-594c-8102-9f4d-000206937e8e\",\"command\":\"replaceContent\",\"properties\":{\"title\":\"New Page Title\"},\"newStr\":\"# New Section\nUpdated content goes here\"}\n\n替换页面中的特定内容:\n{\"pageUrl\":\"user://20ed872b-594c-8102-9f4d-000206937e8e\",\"command\":\"replaceContentRange\",\"selectionWithEllipsis\":\"# Old Section...end of section\",\"newStr\":\"# New Section\nUpdated content goes here\"}\n\n在特定文本后插入内容:\n{\"pageUrl\":\"user://20ed872b-594c-8102-9f4d-000206937e8e\",\"command\":\"insertContentAfter\",\"selectionWithEllipsis\":\"Previous section...end of section\",\"newStr\":\"## New Section\nContent to insert goes here\"}\n\n将页面移动到数据源:\n{\"pageUrl\":\"user://20ed872b-594c-8102-9f4d-000206937e8e\",\"command\":\"updateProperties\",\"parentDataSourceUrl\":\"https://www.notion.so/22641c91b3f580808e41c298eedc933f\",\"properties\":{}}\n\n将页面移动到另一个页面:\n{\"pageUrl\":\"user://20ed872b-594c-8102-9f4d-000206937e8e\",\"command\":\"updateProperties\",\"parentPageUrl\":\"https://www.notion.so/22641c91b3f580808e41c298eedc933f\",\"properties\":{}}\n\n用新的子页面更新页面内容:\n{\"pageUrl\":\"user://20ed872b-594c-8102-9f4d-000206937e8e\",\"command\":\"replaceContent\",\"newStr\":\"# New Section\n<page>New Page</page>\"}\n\n用新的内联数据库更新页面:\n{\"pageUrl\":\"user://20ed872b-594c-8102-9f4d-000206937e8e\",\"command\":\"replaceContent\",\"newStr\":\"# New Section\n<database inline=\"true\">New Database</database>\"}",
|
||
"name": "update-page",
|
||
"parameters": {
|
||
"properties": {
|
||
"command": {
|
||
"description": "要执行的命令:\n- \"updateProperties\":更新页面属性(需要 'properties' 字段)\n- \"replaceContent\":替换页面中的所有内容(需要 'newStr' 字段)\n- \"replaceContentRange\":替换页面中的特定内容(需要 'selectionWithEllipsis' 和 'newStr' 字段)\n- \"insertContentAfter\":在特定文本后新起一行插入内容(需要 'selectionWithEllipsis' 和 'newStr' 字段)。请记住,由于新内容会插入到新行上,通常你不应该以换行符开始该字符串。",
|
||
"enum": [
|
||
"updateProperties",
|
||
"replaceContent",
|
||
"replaceContentRange",
|
||
"insertContentAfter"
|
||
],
|
||
"type": "string"
|
||
},
|
||
"newStr": {
|
||
"description": "[当 command=\"replaceContent\", \"replaceContentRange\", 或 \"insertContentAfter\" 时必需] 新的字符串。\n- 对于 replaceContent:用于替换所有内容的新字符串\n- 对于 replaceContentRange:用于替换匹配内容的新字符串\n- 对于 insertContentAfter:用于插入到匹配内容之后的新内容",
|
||
"type": "string"
|
||
},
|
||
"pageUrl": {
|
||
"description": "要更新的页面的 URL。此 URL 必须已使用 'view' 工具加载,否则将找不到该页面。",
|
||
"type": "string"
|
||
},
|
||
"parentDataSourceUrl": {
|
||
"description": "你想要将页面移动到的数据源的 URL。请使用 <data-source> XML 标签中的 url 属性。",
|
||
"type": "string"
|
||
},
|
||
"parentPageUrl": {
|
||
"description": "你想要将页面移动到的父页面的 URL。请使用 <page> XML 标签中的 url 属性。",
|
||
"type": "string"
|
||
},
|
||
"properties": {
|
||
"additionalProperties": {
|
||
"type": [
|
||
"string",
|
||
"number",
|
||
"null"
|
||
]
|
||
},
|
||
"description": "[当 command=\"updateProperties\" 时必需] 一个用于更新页面属性的 JSON 对象。\n对于数据源中的页面,请使用 <sqlite-table> 中显示的 SQLite 模式定义。\n对于数据源之外的页面,唯一允许的属性是 \"title\",即页面的标题,使用内联 markdown 格式。\n有关可接受的格式,请参见 “Property Value Formats” (属性值格式) 部分。",
|
||
"properties": {
|
||
"title": {
|
||
"description": "要赋予页面的标题,如果它不在数据源中。如果页面在数据源中,请仅使用数据源模式中的属性。",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"type": "object"
|
||
},
|
||
"selectionWithEllipsis": {
|
||
"description": "[当 command=\"replaceContentRange\" 或 \"insertContentAfter\" 时必需] 要在页面内容中匹配的字符串的唯一开始和结束片段,包括空白。\n不要 (DO NOT) 提供要匹配的整个字符串。相反,提供最多为要匹配字符串的前几个词,一个省略号 (...),然后是最多为要匹配字符串的最后几个词。请记住,省略号之前的开始序列和省略号之后的结束序列不得重叠;在选择开始序列时,请确保它足够早地结束,以便你能够在省略号之后包含一个合适的、不重叠的结束序列。\n请确保你提供了足够的开始和结束片段,以唯一标识要匹配的字符串。\n例如,要匹配整个部分,请使用 \"selectionWithEllipsis\":\"# 章节标题...最后一段。\"\n不要在你的选择中包含 <content> 标签。",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"pageUrl",
|
||
"command"
|
||
],
|
||
"type": "object"
|
||
}
|
||
},
|
||
{
|
||
"description": "通过将一个或多个 Notion 页面移动到垃圾箱来删除它们。",
|
||
"name": "delete-pages",
|
||
"parameters": {
|
||
"properties": {
|
||
"pageUrls": {
|
||
"description": "要删除的页面的 URL。请使用 <page> XML 标签中的 url 属性。",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"type": "array"
|
||
}
|
||
},
|
||
"required": [
|
||
"pageUrls"
|
||
],
|
||
"type": "object"
|
||
}
|
||
},
|
||
{
|
||
"description": "使用 query-data-sources 对数据源 (Data Sources) 中的页面执行 SQLite 查询,或按 ID 查询特定视图。此工具可用于根据你上下文中可见的特定数据源提取或分析结构化数据。\n\n模式 1:对数据源进行 SQL 查询\n你可以查询和连接 dataSourceUrls 中数据源集合里的任何表,这些表由其 <sqlite-table> 标签定义。\n只允许只读查询。该工具不会执行 UPDATE、INSERT 或 DELETE 操作。\n确保你已经查看了你正在查询的所有数据源。\n在可能的情况下,在 select 子句中包含 url 列。\n\n如果你查询的列是与另一个数据源相关的页面 URL,请先查看该数据源,然后执行 JOIN 查询以获取相关的页面数据。\n\n示例 1:查询 URL 为 https://www.notion.com/signup 的 OKRs 数据源,查找所有状态为 “In progress” 且已到期的页面:\n{\n\tmode: \"sql\",\n\tdataSourceUrls: [\"https://www.notion.com/signup\"],\n\tquery: \"SELECT * FROM \"https://www.notion.com/signup\" WHERE \"Status\" = ? and \"Is due\" = ?\",\n\tparams: [\"In progress\", \"__YES__\"],\n}\n\n示例 2:连接两个相关的数据源,OKRs (https://www.notion.com/signup) 和 Teams (https://www.notion.com/contact-sales),并获取所有 OKR 及其团队名称:\n{\n\tmode: \"sql\",\n\tdataSourceUrls: [\"https://www.notion.com/signup\", \"https://www.notion.com/contact-sales\"],\n\tquery: \"SELECT o.*, t.\"Team Name\" FROM \"https://www.notion.com/signup\" o JOIN \"https://www.notion.com/contact-sales\" t ON t.url IN (SELECT value FROM json_each(o.\"Team\"))\",\n\tparams: [],\n}\n\nSQLite 提示:\n- 表名是数据源的 URL,并且必须使用双引号\n- 列名:对于带空格/特殊字符的名称使用双引号 \"(\"Task Name\"),对于简单名称则不需要(user_id)\n- 字符串值:使用单引号,并用双单引号进行转义 ('Won''t Fix', 'O''Reilly')\n- 标识符中的双引号:将它们加倍 (\"column\"\"with\"\"quotes\")\n- 保留字必须使用双引号 (\"order\", \"where\")\n\n可查询列规则:\n- 只有以下类型的列可以使用此工具进行查询:[title, person, file, text, checkbox, url, email, phone_number, created_by, last_edited_by, select, multi_select, status, date, created_time, last_edited_time, relation, number, auto_increment_id, location]\n- 其他列类型将不会出现在 SQLite 表或结果中\n- 无法查询的列在用户界面中仍然可见\n\n模式 2:查询特定视图\n示例:查询 URL 为 20ed872b-594c-8102-9f4d-000206937e8e 的特定视图:\n{\n\tmode: \"view\",\n\tviewUrl: \"20ed872b-594c-8102-9f4d-000206937e8e\"\n}\n\n此工具一次最多将返回 100 行,并带有一个 hasMore 标志。\n如果你需要更多行,请使用 hasMore 来决定是否进行分页。",
|
||
"name": "query-data-sources",
|
||
"parameters": {
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"dataSourceUrls": {
|
||
"description": "要查询的数据源的 URL。使用 SQL 查询模式时必需。",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"mode": {
|
||
"description": "用于查询的模式。",
|
||
"enum": [
|
||
"sql",
|
||
"view"
|
||
],
|
||
"type": "string"
|
||
},
|
||
"params": {
|
||
"description": "要在查询中使用的参数值。",
|
||
"items": {
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"query": {
|
||
"description": "SQLite 查询,可选参数使用 ? 标记。\n必须是只读查询。\n使用 SQL 查询模式时必需。",
|
||
"type": "string"
|
||
},
|
||
"viewUrl": {
|
||
"description": "要查询的特定视图的 URL。使用 view 模式时必需。",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"mode"
|
||
],
|
||
"type": "object"
|
||
}
|
||
},
|
||
{
|
||
"description": "创建一个新数据库 (Database)。\n\n将需求格式化为 markdown 项目符号列表。\n每个需求都应该是一个清晰描述你希望数据库创建后所应具备的特性的语句。\n不要 (DO NOT) 尝试在需求中引用用户的消息,因为创建数据库的子代理将无法 (NOT) 看到它们。确保完整地包含所有重要信息。\n如果你需要在需求中引用实体,请使用实体 URL 并提供上下文。\n\n在数据源之间添加双向关联 (two-way relation) 时,请记住,将其添加到一个数据源也会在另一个数据源上添加一个属性,因此请确保不要意外地创建了两次双向关联。\n创建关联 (relations) 时,请在需求中提及两个数据源的 URL,即使其中一个数据源在另一个数据库中。\n关联必须由数据源 URL 定义,而不是页面或数据库 URL。\n\n\n数据库 (Databases) 必须至少有一个视图 (view)。",
|
||
"name": "create-database",
|
||
"parameters": {
|
||
"properties": {
|
||
"dataSourceRequirements": {
|
||
"description": "为创建或更新数据源 (data sources) 的模式 (schema) 提供详细需求。\n如果你想创建多个数据源,请通过在此字符串中为每个数据源指定需求来同时执行所有更新。\n需求不能指定数据源的内容,只能指定模式。如果你想向数据源添加页面,你需要使用 'create-pages' 工具。\n需求不能为属性指定默认值。\n请注意,你不能在单个数据库 (Database) 中创建多个数据源 (Data sources)。你必须创建多个数据库,每个拥有的数据源对应一个数据库。",
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"description": "数据库 (Database) 的名称。",
|
||
"type": "string"
|
||
},
|
||
"parentPageUrl": {
|
||
"description": "可选,你想要在其中创建此新数据库 (Database) 的父页面的 URL。请使用 <page> XML 标签中的 url 属性。如果为空,该数据库将作为顶层私有页面创建。",
|
||
"type": "string"
|
||
},
|
||
"replacesBlankParentPage": {
|
||
"description": "当为 true 时,parentPageUrl 必须指向一个空白页面(没有内容的页面)。该空白页面将被删除,并且数据库 (Database) 将在其位置被创建,继承空白页面的父级。",
|
||
"type": "boolean"
|
||
},
|
||
"viewRequirements": {
|
||
"description": "为创建视图 (views) 提供详细需求。确保提供视图需要使用的任何现有数据源的数据源 URL,例如 https://pinterest.com/pin/create/button/?url=https://www.toolify.ai/ai-news/master-notion-ai-beginners-guide-89033。",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"name"
|
||
],
|
||
"type": "object"
|
||
}
|
||
},
|
||
{
|
||
"description": "更新单个现有的数据库 (Database)。\n\n将需求格式化为 markdown 项目符号列表。\n每个需求都应该是一个清晰描述你希望数据库更新后所应具备的特性的语句。\n不要 (DO NOT) 尝试在需求中引用用户的消息,因为更新数据库的子代理将无法 (NOT) 看到它们。确保完整地包含所有重要信息。\n如果你需要在需求中引用实体,请使用实体 URL 并提供上下文。\n如果用户明确要求在日期属性上设置提醒/通知,请在此处向日期属性添加 default_reminder\n不要添加任何未明确要求用以满足用户请求的额外需求。\n\n仅修改指定数据库 (database) 拥有的视图 (views) 或数据源 (data sources)。\n在数据源之间添加双向关联 (two-way relation) 时,请记住,将其添加到一个数据源也会在另一个数据源上添加一个属性,因此请确保不要意外地创建了两次双向关联。\n创建关联 (relations) 时,请在需求中提及两个数据源的 URL,即使其中一个数据源在另一个数据库中。\n关联必须由数据源 URL 定义,而不是页面或数据库 URL。\n\n数据库 (Databases) 必须至少有一个视图 (view)。\n如果你想制作日历 (calendar) 或时间线 (timeline) 视图,请确保数据源至少有一个日期属性。\n\n# 内联数据库 (Inline Databases)\n重要提示:你不能使用此工具更新数据库的 \"inline\" 属性。请使用页面工具 (page tool) 来更新内联属性。\n如果你通过页面工具 (page tools) 创建了另一个内联数据库 (inline database),并希望创建到它的关联 (relation),你必须使用 view 工具获取其数据源 URL 来定义该关联。\n\n关于更改数据源属性类型的说明:更改属性的类型是一个有损操作,数据源中所有页面的现有属性数据将会丢失 (LOST)。如果任务要求保留现有数据,你需要按顺序执行以下操作:\n1. 获取数据源中所有页面的现有属性值\n2. 将属性的类型更改为新类型\n3. 将数据源中所有页面的属性值更新为新类型",
|
||
"name": "update-database",
|
||
"parameters": {
|
||
"properties": {
|
||
"dataSourceRequirements": {
|
||
"description": "为更新数据源 (data sources) 的模式 (schema) 提供详细需求。\n如果你想创建或更新多个数据源,请通过在此字符串中为每个数据源指定需求来同时执行所有更新。\n确保提供需要更新的任何现有数据源的数据源 URL,例如 https://pinterest.com/pin/create/button/?url=https://www.toolify.ai/ai-news/master-notion-ai-beginners-guide-89033。\n重要说明:此工具不会 (NOT) 对数据源中的页面进行任何更新,只会更新其模式。\n需求不能为属性指定默认值。\n请注意,你不能在单个数据库 (Database) 中创建多个数据源 (Data sources)。你必须创建多个数据库,每个拥有的数据源对应一个数据库。",
|
||
"type": "string"
|
||
},
|
||
"databaseUrl": {
|
||
"description": "要更新的数据库 (Database) 的 URL。",
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"description": "可选,数据库 (Database) 的新名称。如果数据库只有一个数据源 (Data Source),这将自动同步到该数据源的名称。",
|
||
"type": "string"
|
||
},
|
||
"viewRequirements": {
|
||
"description": "为更新视图 (views) 提供详细需求。确保提供视图需要使用的任何现有数据源的数据源 URL,例如 https://pinterest.com/pin/create/button/?url=https://www.toolify.ai/ai-news/master-notion-ai-beginners-guide-89033。",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"databaseUrl"
|
||
],
|
||
"type": "object"
|
||
}
|
||
}
|
||
]
|