notis-query
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNotis Query Skill
Notis 查询技能
Use this skill when the user wants to search, filter, sort, or page through records in a native Notis database and the task is best handled with structured criteria instead of semantic search.
This skill is the single source of truth for .
LOCAL_NOTIS_DATABASE_QUERY当用户希望在原生Notis数据库中搜索、筛选、排序或分页查看记录,且该任务更适合通过结构化条件而非语义搜索处理时,可使用本技能。
本技能是的唯一权威参考。
LOCAL_NOTIS_DATABASE_QUERYCanonical contract source
标准契约来源
For custom view runtime usage, the canonical contract is always MCP for .
tools/listinputSchemaLOCAL_NOTIS_DATABASE_QUERY- Use (or MCP
notisView.listTools()) to read the live schema.tools/list - Use (or MCP
notisView.callTool("LOCAL_NOTIS_DATABASE_QUERY", args)) with arguments that match that schema exactly.tools/call - If this skill text and ever differ, follow
inputSchema.inputSchema
This keeps query arguments aligned with the same tool definitions used by agent runtime and avoids maintaining duplicate schema formats.
对于自定义视图运行时使用场景,标准契约始终是MCP 中的。
tools/listLOCAL_NOTIS_DATABASE_QUERYinputSchema- 使用(或MCP
notisView.listTools())读取实时模式。tools/list - 使用(或MCP
notisView.callTool("LOCAL_NOTIS_DATABASE_QUERY", args)),传入与该模式完全匹配的参数。tools/call - 若本技能文本与存在差异,以
inputSchema为准。inputSchema
这可确保查询参数与Agent运行时使用的工具定义保持一致,避免维护重复的模式格式。
When to use LOCAL_NOTIS_DATABASE_QUERY
LOCAL_NOTIS_DATABASE_QUERY何时使用LOCAL_NOTIS_DATABASE_QUERY
LOCAL_NOTIS_DATABASE_QUERYUse when:
LOCAL_NOTIS_DATABASE_QUERY- you already know the target native database
- the user wants structured filtering or sorting
- you need predictable pagination over database rows
- you need to find records before reading or updating a specific document
- you need to find matching records before calling or a generated database upsert tool
LOCAL_NOTIS_DATABASE_GET_DOCUMENT - the task should use direct database criteria instead of semantic memory search
Do not use when:
LOCAL_NOTIS_DATABASE_QUERY- the relevant database is unknown
- semantic search over broad workspace context is better
- the task points to one known document by or portal URL
document_id
Use these tools together:
- to discover available databases and confirm the slug
LOCAL_NOTIS_DATABASE_LIST_DATABASES - to inspect read-only schema detail, ordered properties, options, and relation targets
LOCAL_NOTIS_DATABASE_GET_DATABASE - to find matching records
LOCAL_NOTIS_DATABASE_QUERY - to inspect one specific matching document in full
LOCAL_NOTIS_DATABASE_GET_DOCUMENT - generated database upsert tools to update or create records after you know the right document or relation IDs
Follow the same workflow and use the exact canonical tool names available in the current runtime.
在以下场景使用:
LOCAL_NOTIS_DATABASE_QUERY- 已明确目标原生数据库
- 用户需要结构化筛选或排序
- 需要对数据库行进行可预测的分页
- 需要在读取或更新特定文档前查找记录
- 需要在调用或生成的数据库更新插入工具前查找匹配记录
LOCAL_NOTIS_DATABASE_GET_DOCUMENT - 任务应使用直接数据库条件而非语义记忆搜索
在以下场景请勿使用:
LOCAL_NOTIS_DATABASE_QUERY- 相关数据库未知
- 对广泛工作区上下文进行语义搜索更合适
- 任务通过或门户URL指向某个已知文档
document_id
可结合使用以下工具:
- :发现可用数据库并确认别名(slug)
LOCAL_NOTIS_DATABASE_LIST_DATABASES - :检查只读模式详情、有序属性、选项和关联目标
LOCAL_NOTIS_DATABASE_GET_DATABASE - :查找匹配记录
LOCAL_NOTIS_DATABASE_QUERY - :完整查看某个特定匹配文档
LOCAL_NOTIS_DATABASE_GET_DOCUMENT - 生成的数据库更新插入工具:在确定正确文档或关联ID后更新或创建记录
遵循相同工作流程,并使用当前运行时中可用的准确标准工具名称。
Native Database Workflow
原生数据库工作流程
Listing databases
列出数据库
Use ( in legacy
underscore-form references) when:
LOCAL_NOTIS_DATABASE_LIST_DATABASESnotis_list_databases- you need to confirm which native databases exist
- you need the database ID or slug before querying or choosing an upsert tool
- you need database metadata such as name, description, or document counts
- the orchestrator asks what is available in the user's workspace
Always inspect the user's native Notis databases before creating schema updates or choosing where to save work.
在以下场景使用(旧版下划线格式引用为):
LOCAL_NOTIS_DATABASE_LIST_DATABASESnotis_list_databases- 需要确认存在哪些原生数据库
- 需要数据库ID或别名(slug)以进行查询或选择更新插入工具
- 需要数据库元数据,如名称、描述或文档数量
- 编排器询问用户工作区中有哪些可用资源
在创建模式更新或选择保存位置前,务必先查看用户的原生Notis数据库。
Creating databases
创建数据库
Use ( in legacy
underscore-form references) to create or update native databases.
LOCAL_NOTIS_DATABASE_UPSERT_DATABASEnotis_upsert_databaseEvery native database must belong to a Notis app. When creating a database,
pass the owning app's slug or id in the field; if the user has no
suitable app yet, create one first with . Updates do
not need the field.
appLOCAL_NOTIS_CREATE_APPappDefine schemas with appropriate property types:
titlerich_textselectmulti_selectstatuscheckboxdatenumberurlemailphone_numberrelation
When adding or updating a property, always pass the target database explicitly with . Do not rely on description text to imply the relation target.
relationdatabase_idExample relation update:
json
{
"operation": "update",
"database_id": "tasks-db-id",
"properties": [
{
"property_id": "prop_list",
"name": "List",
"action": "update",
"type": "relation",
"database_id": "lists-db-id",
"description": "Relation to Lists"
}
]
}使用(旧版下划线格式引用为)创建或更新原生数据库。
LOCAL_NOTIS_DATABASE_UPSERT_DATABASEnotis_upsert_database每个原生数据库必须属于一个Notis应用。创建数据库时,需在字段中传入所属应用的别名(slug)或ID;若用户尚无合适应用,需先使用创建一个。更新操作无需传入字段。
appLOCAL_NOTIS_CREATE_APPapp使用合适的属性类型定义模式:
titlerich_textselectmulti_selectstatuscheckboxdatenumberurlemailphone_numberrelation
添加或更新属性时,务必通过明确传入目标数据库。请勿依赖描述文本暗示关联目标。
relationdatabase_id关联更新示例:
json
{
"operation": "update",
"database_id": "tasks-db-id",
"properties": [
{
"property_id": "prop_list",
"name": "List",
"action": "update",
"type": "relation",
"database_id": "lists-db-id",
"description": "Relation to Lists"
}
]
}Reading documents
读取文档
Use when:
LOCAL_NOTIS_DATABASE_GET_DOCUMENT- the task references a specific document by or portal URL
document_id - detailed content from a known document is needed
You may pass either a or a portal URL such as or .
document_idhttps://app.notis.ai/documents/abc123/documents/abc123在以下场景使用:
LOCAL_NOTIS_DATABASE_GET_DOCUMENT- 任务通过或门户URL引用特定文档
document_id - 需要已知文档的详细内容
可传入或门户URL,如或。
document_idhttps://app.notis.ai/documents/abc123/documents/abc123Native Document Handling
原生文档处理
Response requirements
响应要求
- Always include the document title, database name, and a markdown portal link for any document you create or update.
- Never expose a raw in your completion summary unless the user explicitly asked for it.
document_id - Clearly state whether the document was created or updated.
- For updates, clearly state whether you replaced the original content or appended to the end.
- 对于创建或更新的任何文档,务必包含文档标题、数据库名称和markdown格式的门户链接。
- 除非用户明确要求,否则请勿在完成摘要中暴露原始。
document_id - 明确说明文档是创建还是更新。
- 对于更新操作,明确说明是替换原始内容还是追加到末尾。
Upserting with relations
带关联的更新插入
When upserting into a database that relates to another database, first query for the related record and use the returned for the relation.
document_id当向与其他数据库关联的数据库执行更新插入操作时,需先查询关联记录,并使用返回的作为关联值。
document_idUpserting complex documents
复杂文档的更新插入
For copywriting-style work such as articles or social posts, try to find similar writing by the user and match the user's style and tone.
对于文案类工作(如文章或社交帖子),请尝试查找用户的类似作品,并匹配用户的风格和语气。
Updating a document
更新文档
- Retrieve the current content with ,
LOCAL_NOTIS_DATABASE_GET_DOCUMENT, orLOCAL_NOTIS_DATABASE_QUERYwithLOCAL_NOTIS_SEARCH_MEMORIES.memory_kind="native_document" - Use the relevant tool with the existing
LOCAL_NOTIS_DATABASE_UPSERT_<DATABASE_SLUG>so the document is updated instead of recreated.document_id - For local edits to an existing document such as appending a bullet, inserting a paragraph, changing one section, or preserving structure, use instead of rewriting markdown.
edit_mode = "block_operations" - When developer context includes a tag, treat that as the currently open document and fetch it before asking the user for any identifier again.
<page_context ... resource_type="document" ...>
- 使用、
LOCAL_NOTIS_DATABASE_GET_DOCUMENT或LOCAL_NOTIS_DATABASE_QUERY(设置LOCAL_NOTIS_SEARCH_MEMORIES)获取当前内容。memory_kind="native_document" - 使用相关的工具,并传入现有
LOCAL_NOTIS_DATABASE_UPSERT_<DATABASE_SLUG>,以确保更新而非重新创建文档。document_id - 对现有文档进行局部编辑(如追加项目符号、插入段落、修改某部分或保留结构)时,请使用而非重写markdown。
edit_mode = "block_operations" - 当开发者上下文包含标签时,将其视为当前打开的文档,在再次向用户请求标识符前先获取该文档。
<page_context ... resource_type="document" ...>
Default upsert preferences
默认更新插入偏好
As long as they do not conflict with the user's intent, the existing document style, or the tool contract:
- Prefer updating existing documents over creating new ones when the user asked for a modification.
- Use to replace content and
replace = trueto append when you are in markdown mode.replace = false - When the user asked to append, insert, tweak, or preserve the rest of an existing document, prefer with
block_operations,insert_blocks,update_block, orreplace_blocks.remove_blocks - Do not use markdown rewrite mode for surgical edits unless block operations are genuinely impossible for the requested change.
- Reorganize messy thoughts into a clearer structure.
- Highlight essential concepts and extract action items.
- Format notes with markdown titles, subheadings, bold text, blockquotes, ordered lists, and unordered lists when helpful.
- Add useful insight, challenge weak reasoning, debunk false claims, or enrich the content when appropriate.
- Fill in missing information the user asked you to complete when the context supports it.
- Imitate the user's voice when you can infer it from semantic memory search with or existing document context.
memory_kind="native_document" - Save images in document content using standard markdown and in URL properties when relevant.
- Do not place videos inside document content. Store them only in media properties.
- Do not add a custom emoji or cover unless the user requested one.
只要不与用户意图、现有文档风格或工具契约冲突:
- 当用户要求修改时,优先更新现有文档而非创建新文档。
- 在markdown模式下,使用替换内容,
replace = true追加内容。replace = false - 当用户要求追加、插入、微调或保留现有文档的其余部分时,优先使用的
block_operations、insert_blocks、update_block或replace_blocks操作。remove_blocks - 除非确实无法通过块操作完成请求的更改,否则请勿使用markdown重写模式进行精准编辑。
- 将杂乱的想法整理为更清晰的结构。
- 突出关键概念并提取行动项。
- 必要时使用markdown标题、副标题、粗体文本、块引用、有序列表和无序列表格式化笔记。
- 适当添加有用见解、挑战薄弱推理、揭穿错误主张或丰富内容。
- 在上下文支持的情况下,补充用户要求完成的缺失信息。
- 若可通过的语义记忆搜索或现有文档上下文推断出用户的语气,请模仿该语气。
memory_kind="native_document" - 使用标准markdown在文档内容中保存图片,并在相关URL属性中存储图片。
- 请勿在文档内容中放置视频,仅在媒体属性中存储。
- 除非用户要求,否则请勿添加自定义表情符号或封面。
Supported execution mode
支持的执行模式
LOCAL_NOTIS_DATABASE_QUERYNatural-language query generation is retired. Do not send free-form requests like "find overdue tasks from important clients"; build the structured payload yourself.
queryLOCAL_NOTIS_DATABASE_QUERY自然语言查询生成已停用。请勿发送自由格式请求(如“查找重要客户的逾期任务”);请自行构建结构化负载。
queryRequest shape
请求格式
json
{
"database_id": "tasks-db-id",
"database_slug": "tasks",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "In Progress"
}
]
},
"sorts": [
{
"property": "Due Date",
"direction": "ascending"
}
],
"page_size": 20
},
"offset": 0
}Top-level fields:
- One of or
database_idis required.database_slug - : stable native database ID. Prefer this when it is available from database context,
database_id, orlist_databases.get_database - : native database slug. Use this when
database_slugis not available, or pass it alongsidedatabase_idas a fallback.database_id - : required object
query - : optional numeric pagination offset
offset
When both and are provided, they must identify the same database. If the ID is stale and no database is found by ID, the runtime may fall back to the slug.
database_iddatabase_slugquery- : optional rule tree
filter - : optional array of sort definitions
sorts - : optional integer page size
page_size
json
{
"database_id": "tasks-db-id",
"database_slug": "tasks",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "In Progress"
}
]
},
"sorts": [
{
"property": "Due Date",
"direction": "ascending"
}
],
"page_size": 20
},
"offset": 0
}顶级字段:
- 必须传入或
database_id其中之一。database_slug - :稳定的原生数据库ID。当可从数据库上下文、
database_id或list_databases获取时,优先使用该字段。get_database - :原生数据库别名。当
database_slug不可用时使用,或与database_id一同传入作为备选。database_id - :必填对象
query - :可选数值分页偏移量
offset
若同时提供和,二者必须指向同一个数据库。若ID已过期且无法通过ID找到数据库,运行时可能会回退使用别名。
database_iddatabase_slugquery- :可选规则树
filter - :可选排序定义数组
sorts - :可选整数分页大小
page_size
Filter shape
筛选格式
json
{
"operator": "and",
"conditions": [
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "In Progress"
},
{
"property": "Priority",
"type": "select",
"operator": "equals",
"value": "High"
}
]
}Use nested groups when needed:
json
{
"operator": "or",
"conditions": [
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "Todo"
},
{
"operator": "and",
"conditions": [
{
"property": "Priority",
"type": "select",
"operator": "equals",
"value": "High"
},
{
"property": "Archived",
"type": "checkbox",
"operator": "equals",
"value": false
}
]
}
]
}json
{
"operator": "and",
"conditions": [
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "In Progress"
},
{
"property": "Priority",
"type": "select",
"operator": "equals",
"value": "High"
}
]
}必要时可使用嵌套分组:
json
{
"operator": "or",
"conditions": [
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "Todo"
},
{
"operator": "and",
"conditions": [
{
"property": "Priority",
"type": "select",
"operator": "equals",
"value": "High"
},
{
"property": "Archived",
"type": "checkbox",
"operator": "equals",
"value": false
}
]
}
]
}Supported property semantics
支持的属性语义
Use the real Notis property name and the correct property type.
使用真实的Notis属性名称和正确的属性类型。
Title and rich text
标题和富文本
Recommended operators:
containsequalsnot_equals
Example:
json
{
"property": "Title",
"type": "title",
"operator": "contains",
"value": "launch"
}推荐操作符:
containsequalsnot_equals
示例:
json
{
"property": "Title",
"type": "title",
"operator": "contains",
"value": "launch"
}Select and status
单选和状态
Recommended operators:
equalsnot_equalsin
Example:
json
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "Done"
}推荐操作符:
equalsnot_equalsin
示例:
json
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "Done"
}Multi-select
多选
Recommended operators:
containsnot_contains
Example:
json
{
"property": "Tags",
"type": "multi_select",
"operator": "contains",
"value": "Urgent"
}推荐操作符:
containsnot_contains
示例:
json
{
"property": "Tags",
"type": "multi_select",
"operator": "contains",
"value": "Urgent"
}Checkbox
复选框
Recommended operator:
equals
Example:
json
{
"property": "Archived",
"type": "checkbox",
"operator": "equals",
"value": false
}推荐操作符:
equals
示例:
json
{
"property": "Archived",
"type": "checkbox",
"operator": "equals",
"value": false
}Number
数字
Recommended operators:
equalsnot_equalsgreater_thangreater_than_or_equalless_thanless_than_or_equal
Example:
json
{
"property": "Score",
"type": "number",
"operator": "greater_than_or_equal",
"value": 80
}推荐操作符:
equalsnot_equalsgreater_thangreater_than_or_equalless_thanless_than_or_equal
示例:
json
{
"property": "Score",
"type": "number",
"operator": "greater_than_or_equal",
"value": 80
}Date
日期
Recommended operators:
equalsbeforeafteron_or_beforeon_or_after
Use ISO dates or timestamps depending on the property precision.
Example:
json
{
"property": "Due Date",
"type": "date",
"operator": "on_or_before",
"value": "2026-03-31"
}推荐操作符:
equalsbeforeafteron_or_beforeon_or_after
根据属性精度使用ISO日期或时间戳。
示例:
json
{
"property": "Due Date",
"type": "date",
"operator": "on_or_before",
"value": "2026-03-31"
}Relation
关联
Recommended operators:
containsnot_contains
Pass the related , not the display title.
document_idExample:
json
{
"property": "Project",
"type": "relation",
"operator": "contains",
"value": "doc_project_123"
}推荐操作符:
containsnot_contains
传入关联的,而非显示标题。
document_id示例:
json
{
"property": "Project",
"type": "relation",
"operator": "contains",
"value": "doc_project_123"
}Formula
公式
Treat formula values according to the returned data type. In practice, use the matching operator family for the computed result:
- text-like formula: or
containsequals - number-like formula: numeric comparison operators
- boolean-like formula:
equals
Only use formula filters when the formula property already exists in the schema.
根据返回的数据类型处理公式值。实际使用时,针对计算结果选择匹配的操作符类别:
- 类文本公式:或
containsequals - 类数字公式:数值比较操作符
- 类布尔公式:
equals
仅当模式中已存在公式属性时,才可使用公式筛选。
Sorts
排序
Sort objects look like this:
json
{
"property": "Created At",
"direction": "descending"
}Recommended directions:
ascendingdescending
Common sorts:
- title sorts for alphabetical browsing
- status then date sorts for workflow queues
- timestamp sorts such as ,
Created At, orUpdated AtLast Edited Time
Example:
json
[
{
"property": "Last Edited Time",
"direction": "descending"
}
]排序对象格式如下:
json
{
"property": "Created At",
"direction": "descending"
}推荐排序方向:
ascendingdescending
常见排序方式:
- 按标题排序以进行字母顺序浏览
- 按状态再按日期排序以处理工作流队列
- 按时间戳排序,如、
Created At或Updated AtLast Edited Time
示例:
json
[
{
"property": "Last Edited Time",
"direction": "descending"
}
]Pagination
分页
Use to cap the number of results per call.
page_sizeThe response returns:
documentsresults_counthas_morenext_offsetquerycomplementary_instructions
Pagination rules:
- start with or omit it
offset: 0 - if is true, call again with
has_moreoffset: next_offset
Example follow-up call:
json
{
"database_id": "tasks-db-id",
"query": {
"page_size": 25
},
"offset": 25
}使用限制每次调用的结果数量。
page_size响应返回以下内容:
documentsresults_counthas_morenext_offsetquerycomplementary_instructions
分页规则:
- 从开始,或省略该字段
offset: 0 - 若为true,则使用
has_more再次调用offset: next_offset
后续调用示例:
json
{
"database_id": "tasks-db-id",
"query": {
"page_size": 25
},
"offset": 25
}Response shape
响应格式
The result includes database rows in . Each document usually contains:
documentsdocument_id- title-like display fields
- matching property values
- metadata helpful for follow-up reads or updates
Use from the query response when you need to:
document_id- fetch full content with
LOCAL_NOTIS_DATABASE_GET_DOCUMENT - update a record with a generated database upsert tool
- attach it to a relation field in another upsert
结果在中包含数据库行。每个文档通常包含:
documentsdocument_id- 类标题显示字段
- 匹配的属性值
- 有助于后续读取或更新的元数据
当需要以下操作时,使用查询响应中的:
document_id- 使用获取完整内容
LOCAL_NOTIS_DATABASE_GET_DOCUMENT - 使用生成的数据库更新插入工具更新记录
- 在另一个更新插入操作中附加到关联字段
Examples
示例
Title or rich text contains
标题或富文本包含指定内容
json
{
"database_id": "notes-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Title",
"type": "title",
"operator": "contains",
"value": "pricing"
}
]
},
"page_size": 10
}
}json
{
"database_id": "notes-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Title",
"type": "title",
"operator": "contains",
"value": "pricing"
}
]
},
"page_size": 10
}
}Select or status equals
单选或状态等于指定值
json
{
"database_id": "tasks-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "In Progress"
}
]
}
}
}json
{
"database_id": "tasks-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Status",
"type": "status",
"operator": "equals",
"value": "In Progress"
}
]
}
}
}Multi-select contains
多选包含指定选项
json
{
"database_id": "content-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Tags",
"type": "multi_select",
"operator": "contains",
"value": "Newsletter"
}
]
}
}
}json
{
"database_id": "content-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Tags",
"type": "multi_select",
"operator": "contains",
"value": "Newsletter"
}
]
}
}
}Checkbox equals
复选框等于指定状态
json
{
"database_id": "tasks-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Completed",
"type": "checkbox",
"operator": "equals",
"value": true
}
]
}
}
}json
{
"database_id": "tasks-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Completed",
"type": "checkbox",
"operator": "equals",
"value": true
}
]
}
}
}Number comparison
数字比较
json
{
"database_id": "deals-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Amount",
"type": "number",
"operator": "greater_than",
"value": 10000
}
]
}
}
}json
{
"database_id": "deals-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Amount",
"type": "number",
"operator": "greater_than",
"value": 10000
}
]
}
}
}Date comparison
日期比较
json
{
"database_id": "tasks-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Due Date",
"type": "date",
"operator": "on_or_after",
"value": "2026-03-01"
}
]
},
"sorts": [
{
"property": "Due Date",
"direction": "ascending"
}
]
}
}json
{
"database_id": "tasks-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Due Date",
"type": "date",
"operator": "on_or_after",
"value": "2026-03-01"
}
]
},
"sorts": [
{
"property": "Due Date",
"direction": "ascending"
}
]
}
}Relation contains
关联包含指定文档
json
{
"database_id": "tasks-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Project",
"type": "relation",
"operator": "contains",
"value": "doc_project_123"
}
]
}
}
}json
{
"database_id": "tasks-db-id",
"query": {
"filter": {
"operator": "and",
"conditions": [
{
"property": "Project",
"type": "relation",
"operator": "contains",
"value": "doc_project_123"
}
]
}
}
}Timestamp sort
按时间戳排序
json
{
"database_id": "tasks-db-id",
"query": {
"sorts": [
{
"property": "Last Edited Time",
"direction": "descending"
}
],
"page_size": 20
}
}json
{
"database_id": "tasks-db-id",
"query": {
"sorts": [
{
"property": "Last Edited Time",
"direction": "descending"
}
],
"page_size": 20
}
}Pagination follow-up
分页后续调用
First call:
json
{
"database_id": "tasks-db-id",
"query": {
"page_size": 20
}
}Second call after a response with and :
has_more: truenext_offset: 20json
{
"database_id": "tasks-db-id",
"query": {
"page_size": 20
},
"offset": 20
}首次调用:
json
{
"database_id": "tasks-db-id",
"query": {
"page_size": 20
}
}收到且的响应后,第二次调用:
has_more: truenext_offset: 20json
{
"database_id": "tasks-db-id",
"query": {
"page_size": 20
},
"offset": 20
}Practical workflow
实际工作流程
- Call if you do not know the database ID yet.
LOCAL_NOTIS_DATABASE_LIST_DATABASES - Call if you need schema detail before building filters or relation payloads.
LOCAL_NOTIS_DATABASE_GET_DATABASE - Call with
LOCAL_NOTIS_DATABASE_QUERYplus structured filters and sorts. Usedatabase_idonly when the ID is not available.database_slug - If you need the full body of one row, call with the returned
LOCAL_NOTIS_DATABASE_GET_DOCUMENT.document_id - If you need to update one of the matched rows, call the relevant generated database upsert tool with that .
document_id - If you need a relation value, query the related database first and pass the resulting into the upsert.
document_id
- 若未知数据库ID,调用。
LOCAL_NOTIS_DATABASE_LIST_DATABASES - 若在构建筛选条件或关联负载前需要模式详情,调用。
LOCAL_NOTIS_DATABASE_GET_DATABASE - 调用,传入
LOCAL_NOTIS_DATABASE_QUERY及结构化筛选和排序条件。仅当ID不可用时使用database_id。database_slug - 若需要某一行的完整内容,使用返回的调用
document_id。LOCAL_NOTIS_DATABASE_GET_DOCUMENT - 若需要更新某条匹配行,使用该调用相关的生成数据库更新插入工具。
document_id - 若需要关联值,先查询关联数据库,再将得到的传入更新插入操作。
document_id