notis-query

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Notis 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_QUERY
的唯一权威参考。

Canonical contract source

标准契约来源

For custom view runtime usage, the canonical contract is always MCP
tools/list
inputSchema
for
LOCAL_NOTIS_DATABASE_QUERY
.
  • Use
    notisView.listTools()
    (or MCP
    tools/list
    ) to read the live schema.
  • Use
    notisView.callTool("LOCAL_NOTIS_DATABASE_QUERY", args)
    (or MCP
    tools/call
    ) with arguments that match that schema exactly.
  • If this skill text and
    inputSchema
    ever differ, follow
    inputSchema
    .
This keeps query arguments aligned with the same tool definitions used by agent runtime and avoids maintaining duplicate schema formats.
对于自定义视图运行时使用场景,标准契约始终是MCP
tools/list
LOCAL_NOTIS_DATABASE_QUERY
inputSchema
  • 使用
    notisView.listTools()
    (或MCP
    tools/list
    )读取实时模式。
  • 使用
    notisView.callTool("LOCAL_NOTIS_DATABASE_QUERY", args)
    (或MCP
    tools/call
    ),传入与该模式完全匹配的参数。
  • 若本技能文本与
    inputSchema
    存在差异,以
    inputSchema
    为准。
这可确保查询参数与Agent运行时使用的工具定义保持一致,避免维护重复的模式格式。

When to use
LOCAL_NOTIS_DATABASE_QUERY

何时使用
LOCAL_NOTIS_DATABASE_QUERY

Use
LOCAL_NOTIS_DATABASE_QUERY
when:
  • 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
    LOCAL_NOTIS_DATABASE_GET_DOCUMENT
    or a generated database upsert tool
  • the task should use direct database criteria instead of semantic memory search
Do not use
LOCAL_NOTIS_DATABASE_QUERY
when:
  • the relevant database is unknown
  • semantic search over broad workspace context is better
  • the task points to one known document by
    document_id
    or portal URL
Use these tools together:
  • LOCAL_NOTIS_DATABASE_LIST_DATABASES
    to discover available databases and confirm the slug
  • LOCAL_NOTIS_DATABASE_GET_DATABASE
    to inspect read-only schema detail, ordered properties, options, and relation targets
  • LOCAL_NOTIS_DATABASE_QUERY
    to find matching records
  • LOCAL_NOTIS_DATABASE_GET_DOCUMENT
    to inspect one specific matching document in full
  • 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
  • 相关数据库未知
  • 对广泛工作区上下文进行语义搜索更合适
  • 任务通过
    document_id
    或门户URL指向某个已知文档
可结合使用以下工具:
  • LOCAL_NOTIS_DATABASE_LIST_DATABASES
    :发现可用数据库并确认别名(slug)
  • LOCAL_NOTIS_DATABASE_GET_DATABASE
    :检查只读模式详情、有序属性、选项和关联目标
  • LOCAL_NOTIS_DATABASE_QUERY
    :查找匹配记录
  • LOCAL_NOTIS_DATABASE_GET_DOCUMENT
    :完整查看某个特定匹配文档
  • 生成的数据库更新插入工具:在确定正确文档或关联ID后更新或创建记录
遵循相同工作流程,并使用当前运行时中可用的准确标准工具名称。

Native Database Workflow

原生数据库工作流程

Listing databases

列出数据库

Use
LOCAL_NOTIS_DATABASE_LIST_DATABASES
(
notis_list_databases
in legacy underscore-form references) when:
  • 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_DATABASES
(旧版下划线格式引用为
notis_list_databases
):
  • 需要确认存在哪些原生数据库
  • 需要数据库ID或别名(slug)以进行查询或选择更新插入工具
  • 需要数据库元数据,如名称、描述或文档数量
  • 编排器询问用户工作区中有哪些可用资源
在创建模式更新或选择保存位置前,务必先查看用户的原生Notis数据库。

Creating databases

创建数据库

Use
LOCAL_NOTIS_DATABASE_UPSERT_DATABASE
(
notis_upsert_database
in legacy underscore-form references) to create or update native databases.
Every native database must belong to a Notis app. When creating a database, pass the owning app's slug or id in the
app
field; if the user has no suitable app yet, create one first with
LOCAL_NOTIS_CREATE_APP
. Updates do not need the
app
field.
Define schemas with appropriate property types:
  • title
  • rich_text
  • select
  • multi_select
  • status
  • checkbox
  • date
  • number
  • url
  • email
  • phone_number
  • relation
When adding or updating a
relation
property, always pass the target database explicitly with
database_id
. Do not rely on description text to imply the relation target.
Example 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_DATABASE
(旧版下划线格式引用为
notis_upsert_database
)创建或更新原生数据库。
每个原生数据库必须属于一个Notis应用。创建数据库时,需在
app
字段中传入所属应用的别名(slug)或ID;若用户尚无合适应用,需先使用
LOCAL_NOTIS_CREATE_APP
创建一个。更新操作无需传入
app
字段。
使用合适的属性类型定义模式:
  • title
  • rich_text
  • select
  • multi_select
  • status
  • checkbox
  • date
  • number
  • url
  • email
  • phone_number
  • relation
添加或更新
relation
属性时,务必通过
database_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
LOCAL_NOTIS_DATABASE_GET_DOCUMENT
when:
  • the task references a specific document by
    document_id
    or portal URL
  • detailed content from a known document is needed
You may pass either a
document_id
or a portal URL such as
https://app.notis.ai/documents/abc123
or
/documents/abc123
.
在以下场景使用
LOCAL_NOTIS_DATABASE_GET_DOCUMENT
  • 任务通过
    document_id
    或门户URL引用特定文档
  • 需要已知文档的详细内容
可传入
document_id
或门户URL,如
https://app.notis.ai/documents/abc123
/documents/abc123

Native 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
    document_id
    in your completion summary unless the user explicitly asked for it.
  • 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
document_id
for the relation.
当向与其他数据库关联的数据库执行更新插入操作时,需先查询关联记录,并使用返回的
document_id
作为关联值。

Upserting 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

更新文档

  1. Retrieve the current content with
    LOCAL_NOTIS_DATABASE_GET_DOCUMENT
    ,
    LOCAL_NOTIS_DATABASE_QUERY
    , or
    LOCAL_NOTIS_SEARCH_MEMORIES
    with
    memory_kind="native_document"
    .
  2. Use the relevant
    LOCAL_NOTIS_DATABASE_UPSERT_<DATABASE_SLUG>
    tool with the existing
    document_id
    so the document is updated instead of recreated.
  3. For local edits to an existing document such as appending a bullet, inserting a paragraph, changing one section, or preserving structure, use
    edit_mode = "block_operations"
    instead of rewriting markdown.
  4. When developer context includes a
    <page_context ... resource_type="document" ...>
    tag, treat that as the currently open document and fetch it before asking the user for any identifier again.
  1. 使用
    LOCAL_NOTIS_DATABASE_GET_DOCUMENT
    LOCAL_NOTIS_DATABASE_QUERY
    LOCAL_NOTIS_SEARCH_MEMORIES
    (设置
    memory_kind="native_document"
    )获取当前内容。
  2. 使用相关的
    LOCAL_NOTIS_DATABASE_UPSERT_<DATABASE_SLUG>
    工具,并传入现有
    document_id
    ,以确保更新而非重新创建文档。
  3. 对现有文档进行局部编辑(如追加项目符号、插入段落、修改某部分或保留结构)时,请使用
    edit_mode = "block_operations"
    而非重写markdown。
  4. 当开发者上下文包含
    <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
    replace = true
    to replace content and
    replace = false
    to append when you are in markdown mode.
  • When the user asked to append, insert, tweak, or preserve the rest of an existing document, prefer
    block_operations
    with
    insert_blocks
    ,
    update_block
    ,
    replace_blocks
    , or
    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
    memory_kind="native_document"
    or existing document context.
  • 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_QUERY
supports direct structured queries only.
Natural-language query generation is retired. Do not send free-form requests like "find overdue tasks from important clients"; build the structured
query
payload yourself.
LOCAL_NOTIS_DATABASE_QUERY
仅支持直接结构化查询。
自然语言查询生成已停用。请勿发送自由格式请求(如“查找重要客户的逾期任务”);请自行构建结构化
query
负载。

Request 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
    database_id
    or
    database_slug
    is required.
  • database_id
    : stable native database ID. Prefer this when it is available from database context,
    list_databases
    , or
    get_database
    .
  • database_slug
    : native database slug. Use this when
    database_id
    is not available, or pass it alongside
    database_id
    as a fallback.
  • query
    : required object
  • offset
    : optional numeric pagination offset
When both
database_id
and
database_slug
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.
query
fields:
  • filter
    : optional rule tree
  • sorts
    : optional array of sort definitions
  • page_size
    : optional integer 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
    其中之一。
  • database_id
    :稳定的原生数据库ID。当可从数据库上下文、
    list_databases
    get_database
    获取时,优先使用该字段。
  • database_slug
    :原生数据库别名。当
    database_id
    不可用时使用,或与
    database_id
    一同传入作为备选。
  • query
    :必填对象
  • offset
    :可选数值分页偏移量
若同时提供
database_id
database_slug
,二者必须指向同一个数据库。若ID已过期且无法通过ID找到数据库,运行时可能会回退使用别名。
query
字段:
  • 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:
  • contains
  • equals
  • not_equals
Example:
json
{
  "property": "Title",
  "type": "title",
  "operator": "contains",
  "value": "launch"
}
推荐操作符:
  • contains
  • equals
  • not_equals
示例:
json
{
  "property": "Title",
  "type": "title",
  "operator": "contains",
  "value": "launch"
}

Select and status

单选和状态

Recommended operators:
  • equals
  • not_equals
  • in
Example:
json
{
  "property": "Status",
  "type": "status",
  "operator": "equals",
  "value": "Done"
}
推荐操作符:
  • equals
  • not_equals
  • in
示例:
json
{
  "property": "Status",
  "type": "status",
  "operator": "equals",
  "value": "Done"
}

Multi-select

多选

Recommended operators:
  • contains
  • not_contains
Example:
json
{
  "property": "Tags",
  "type": "multi_select",
  "operator": "contains",
  "value": "Urgent"
}
推荐操作符:
  • contains
  • not_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:
  • equals
  • not_equals
  • greater_than
  • greater_than_or_equal
  • less_than
  • less_than_or_equal
Example:
json
{
  "property": "Score",
  "type": "number",
  "operator": "greater_than_or_equal",
  "value": 80
}
推荐操作符:
  • equals
  • not_equals
  • greater_than
  • greater_than_or_equal
  • less_than
  • less_than_or_equal
示例:
json
{
  "property": "Score",
  "type": "number",
  "operator": "greater_than_or_equal",
  "value": 80
}

Date

日期

Recommended operators:
  • equals
  • before
  • after
  • on_or_before
  • on_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"
}
推荐操作符:
  • equals
  • before
  • after
  • on_or_before
  • on_or_after
根据属性精度使用ISO日期或时间戳。
示例:
json
{
  "property": "Due Date",
  "type": "date",
  "operator": "on_or_before",
  "value": "2026-03-31"
}

Relation

关联

Recommended operators:
  • contains
  • not_contains
Pass the related
document_id
, not the display title.
Example:
json
{
  "property": "Project",
  "type": "relation",
  "operator": "contains",
  "value": "doc_project_123"
}
推荐操作符:
  • contains
  • not_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:
    contains
    or
    equals
  • number-like formula: numeric comparison operators
  • boolean-like formula:
    equals
Only use formula filters when the formula property already exists in the schema.
根据返回的数据类型处理公式值。实际使用时,针对计算结果选择匹配的操作符类别:
  • 类文本公式:
    contains
    equals
  • 类数字公式:数值比较操作符
  • 类布尔公式:
    equals
仅当模式中已存在公式属性时,才可使用公式筛选。

Sorts

排序

Sort objects look like this:
json
{
  "property": "Created At",
  "direction": "descending"
}
Recommended directions:
  • ascending
  • descending
Common sorts:
  • title sorts for alphabetical browsing
  • status then date sorts for workflow queues
  • timestamp sorts such as
    Created At
    ,
    Updated At
    , or
    Last Edited Time
Example:
json
[
  {
    "property": "Last Edited Time",
    "direction": "descending"
  }
]
排序对象格式如下:
json
{
  "property": "Created At",
  "direction": "descending"
}
推荐排序方向:
  • ascending
  • descending
常见排序方式:
  • 按标题排序以进行字母顺序浏览
  • 按状态再按日期排序以处理工作流队列
  • 按时间戳排序,如
    Created At
    Updated At
    Last Edited Time
示例:
json
[
  {
    "property": "Last Edited Time",
    "direction": "descending"
  }
]

Pagination

分页

Use
page_size
to cap the number of results per call.
The response returns:
  • documents
  • results_count
  • has_more
  • next_offset
  • query
  • complementary_instructions
Pagination rules:
  • start with
    offset: 0
    or omit it
  • if
    has_more
    is true, call again with
    offset: next_offset
Example follow-up call:
json
{
  "database_id": "tasks-db-id",
  "query": {
    "page_size": 25
  },
  "offset": 25
}
使用
page_size
限制每次调用的结果数量。
响应返回以下内容:
  • documents
  • results_count
  • has_more
  • next_offset
  • query
  • complementary_instructions
分页规则:
  • offset: 0
    开始,或省略该字段
  • has_more
    为true,则使用
    offset: next_offset
    再次调用
后续调用示例:
json
{
  "database_id": "tasks-db-id",
  "query": {
    "page_size": 25
  },
  "offset": 25
}

Response shape

响应格式

The result includes database rows in
documents
. Each document usually contains:
  • document_id
  • title-like display fields
  • matching property values
  • metadata helpful for follow-up reads or updates
Use
document_id
from the query response when you need to:
  • 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
结果在
documents
中包含数据库行。每个文档通常包含:
  • document_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
has_more: true
and
next_offset: 20
:
json
{
  "database_id": "tasks-db-id",
  "query": {
    "page_size": 20
  },
  "offset": 20
}
首次调用:
json
{
  "database_id": "tasks-db-id",
  "query": {
    "page_size": 20
  }
}
收到
has_more: true
next_offset: 20
的响应后,第二次调用:
json
{
  "database_id": "tasks-db-id",
  "query": {
    "page_size": 20
  },
  "offset": 20
}

Practical workflow

实际工作流程

  1. Call
    LOCAL_NOTIS_DATABASE_LIST_DATABASES
    if you do not know the database ID yet.
  2. Call
    LOCAL_NOTIS_DATABASE_GET_DATABASE
    if you need schema detail before building filters or relation payloads.
  3. Call
    LOCAL_NOTIS_DATABASE_QUERY
    with
    database_id
    plus structured filters and sorts. Use
    database_slug
    only when the ID is not available.
  4. If you need the full body of one row, call
    LOCAL_NOTIS_DATABASE_GET_DOCUMENT
    with the returned
    document_id
    .
  5. If you need to update one of the matched rows, call the relevant generated database upsert tool with that
    document_id
    .
  6. If you need a relation value, query the related database first and pass the resulting
    document_id
    into the upsert.
  1. 若未知数据库ID,调用
    LOCAL_NOTIS_DATABASE_LIST_DATABASES
  2. 若在构建筛选条件或关联负载前需要模式详情,调用
    LOCAL_NOTIS_DATABASE_GET_DATABASE
  3. 调用
    LOCAL_NOTIS_DATABASE_QUERY
    ,传入
    database_id
    及结构化筛选和排序条件。仅当ID不可用时使用
    database_slug
  4. 若需要某一行的完整内容,使用返回的
    document_id
    调用
    LOCAL_NOTIS_DATABASE_GET_DOCUMENT
  5. 若需要更新某条匹配行,使用该
    document_id
    调用相关的生成数据库更新插入工具。
  6. 若需要关联值,先查询关联数据库,再将得到的
    document_id
    传入更新插入操作。