docyrus-architect by docyrus/agent-skills
npx skills add https://github.com/docyrus/agent-skills --skill docyrus-architect使用 docyrus-architect MCP 工具管理和查询 Docyrus 中数据源的指南。
get_apps — 列出租户应用。在 create_data_source 前使用,以查找目标 tenantAppId。get_data_source_list — 按名称/描述或应用 ID 搜索数据源。get_data_source_list_with_fields — 同上,但包含字段名称和类型。get_data_source_metadata — 获取数据源的完整元数据(包含 ID、类型、标识符、枚举、关系的字段)。在查询前务必调用此工具,以发现字段标识符和关系目标。get_enums_by_field_id — 获取选择/状态/标签选择字段的枚举选项。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
read_current_user / read_tenant_user — 获取用户信息。create_data_source — 创建新数据源(表)。自动创建的默认字段:id、autonumber_id、name、record_owner、created_on、created_by、last_modified_by、last_modified_on。create_data_sources_batch — 在单个原子事务中创建多个包含字段和枚举选项的数据源。支持通过标识符在同一批次内为 field-relation 类型交叉引用数据源。每批次最多 20 个数据源。update_data_source — 更新数据源属性。delete_data_source — 删除数据源及其所有数据。create_fields — 批量创建字段。为 field-relation 类型设置 relationDataSourceId。update_fields — 批量更新字段。非 CUSTOM 字段会获得自定义记录。delete_fields — 按 ID 批量删除字段。create_enums — 为选择/标签选择/状态字段创建枚举选项。传递 fieldId 用于字段特定枚举,或传递 enumSetId 用于共享枚举集。update_enums — 更新枚举选项的名称/标识符/颜色/图标。delete_enums — 删除枚举选项。regenerate_openapi_spec — 在数据源或字段更改后重新生成并上传租户的 OpenAPI 规范。接受可选的 dataSourceSlugs(字符串数组)以限制范围;省略则包含所有数据源。返回上传规范的 publicUrl。在任何 create_data_source、update_data_source、delete_data_source、create_fields、update_fields 或 delete_fields 操作后调用此工具,以保持规范同步。query_data_source — 使用过滤、排序、聚合、公式、数据透视、子查询读取数据。完整的查询语法请参阅references/data-source-query-guide.md。evaluate_jsonata — 测试 JSONata 表达式。用于验证计算字段公式。get_custom_queries — 列出租户的非归档自定义查询。get_custom_query_by_id — 读取完整的自定义查询定义(name、description、query、filters)。create_custom_query — 使用 Handlebars 变量和可选的过滤器定义创建保存的 SQL 模板。update_custom_query — 更新现有自定义查询的选定字段(部分更新)。delete_custom_query — 软删除(归档)自定义查询。run_custom_query — 使用运行时过滤器、分页偏移量和可选的模拟模式执行保存的自定义查询。单数据源方法:
get_apps 查找目标应用 IDcreate_data_source,提供标题(复数)、名称(单数)、标识符(单数 snake_case)create_fields 添加所有自定义字段(默认字段已存在)create_enumsregenerate_openapi_spec 更新 OpenAPI 规范批处理方法(推荐用于多个数据源):
get_apps 查找目标应用 ID(可选,默认为"Default Customizations App")create_data_sources_batch,提供数据源定义数组(最多 20 个)
title、name、slug 和 fields 数组enumOptionsrelationDataSourceId,以引用同一批次中的其他数据源regenerate_openapi_spec 更新 OpenAPI 规范get_data_source_metadata 发现字段标识符、类型和关系query_data_sourceget_data_source_metadata 查看当前字段create_fields / update_fields / delete_fieldsget_enums_by_field_id,然后调用 create_enums / update_enums / delete_enumsregenerate_openapi_spec 更新 OpenAPI 规范get_custom_queries 查找现有查询或确认命名create_custom_query,提供 name、query 和可选的 description/filtersget_custom_query_by_id 验证保存的模板和过滤器定义update_custom_query 进行针对性编辑(重命名、修订 SQL 模板、更新过滤器定义)delete_custom_queryget_custom_query_by_id 检查 SQL 模板和可用的过滤器标识符filters,其 rules[].field 值需与查询的过滤器标识符匹配run_custom_query 并设置 simulate: true 以检查计划输出run_custom_query 并设置 simulate: false(或省略)以获取真实数据offset 进行分页,每次执行最多返回 50,000 行title 是复数形式(例如,"Sales Orders"),name 是单数形式(例如,"Sales Order"),slug 是单数 snake_case 形式(例如,"sales_order")defaultEditFormTarget: "tab",对于简单表单使用 "side"pluginActivityViewpluginCommentspluginFilepluginDocymentfield-relation 需要 relationDataSourceId — 相关数据源的 ID(UUID),或在批处理操作中,同一批次内另一个数据源的标识符field-list 是显示子记录(一对多)的虚拟字段 — 不存储在数据库中field-select / field-tagSelect / field-status 需要枚举选项:
create_fields 中:字段创建后调用 create_enumscreate_data_sources_batch 中:在字段定义中包含内联的 enumOptions 数组field-formula 使用 JSONata 表达式 — 先用 evaluate_jsonata 测试field-inlineData 存储对象数组,field-inlineForm 存储单个嵌套对象slug 必须是符合 ^[a-z][a-z0-9_]*$ 的 snake_caseslug 必须是符合 ^[a-z][a-z0-9_]*$ 的 snake_case(如果未提供,则根据名称自动生成)create_data_sources_batch 在单个事务中创建最多 20 个数据源slug 作为 relationDataSourceId 进行引用relationDataSourceIdenumOptions 数组按字段定义enumOptions 中的每个枚举选项可以指定:name、slug、color、icon、sortOrderdataSourceId(UUID)来标识要查询的数据源columns 是字段标识符的逗号分隔字符串,而不是数组id 字段进行 count 计算relation_field(sub_field1, sub_field2) 选择嵌套列...relation_field(alias:sub_field) 展平到根对象中rel_{{relation_slug}}/{{field_slug}}today、this_month、last_30_days所有参数在 MCP 工具模式中都是必需的(大多数接受 null):
dataSourceId: string (必需,非空)columns: string | nullfilters: object | nullfilterKeyword: string | nullorderBy: array | nulllimit: number | null (默认: 1000)offset: number | nullfullCount: boolean | nullrecordId: string | null (按 ID 获取单个记录)calculations: array | nulldistinctColumns: array | nullformulas: array | nullchildQueries: array | nullpivot: object | nullquery 内容视为 Handlebars SQL 模板,而非静态 SQL。TENANT_ID、TENANT_SCHEMA、USER_ID、USER_EMAIL、USER_FIRSTNAME、USER_LASTNAME、USER_FULLNAME。{{filter FILTERS.<slug> <column_expression>}} 进行可选的运行时过滤。如果未提供运行时值,该辅助函数将解析为 1=1。create_custom_query / update_custom_query 中的 filters 定义与模板使用一致:
FILTERS.<slug><slug><slug>simulate: true 来检查 EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) 输出。run_custom_query 的运行时限制:50,000 行上限,正常执行 15 秒超时,模拟模式 30 秒超时。delete_custom_query 视为归档操作(软删除),而非永久删除。(table_alias."data"->>'field-uuid')::type 访问自定义字段。query_data_source 的最新参考,包括列、过滤器、orderBy、分页、计算、公式、数据透视、子查询和操作符详细信息。get_custom_queries、get_custom_query_by_id、create_custom_query、update_custom_query、delete_custom_query 和 run_custom_query 的完整生命周期和执行参考。每周安装数
61
代码仓库
GitHub 星标数
13
首次出现
2026年2月14日
安全审计
安装于
codex60
opencode59
gemini-cli58
claude-code58
amp58
github-copilot58
Guide for using docyrus-architect MCP tools to manage and query data sources in Docyrus.
get_apps — List tenant apps. Use before create_data_source to find the target tenantAppId.get_data_source_list — Search data sources by name/description or app ID.get_data_source_list_with_fields — Same as above but includes field names and types.get_data_source_metadata — Get full metadata (fields with IDs, types, slugs, enums, relations) for a data source. Always call this before querying to discover field slugs and relation targets.get_enums_by_field_id — Get enum options for select/status/tagSelect fields.read_current_user / read_tenant_user — Get user info.create_data_source — Create a new data source (table). Default fields auto-created: id, autonumber_id, name, record_owner, created_on, created_by, last_modified_by, last_modified_on.create_data_sources_batch — Create multiple data sources with fields and enum options in a single atomic transaction. Supports cross-referencing data sources within the batch by slug for field-relation types. Max 20 data sources per batch.create_fields — Batch create fields. Set relationDataSourceId for field-relation types.update_fields — Batch update fields. Non-CUSTOM fields get customization records.delete_fields — Batch delete fields by ID.create_enums — Create enum options for select/tagSelect/status fields. Pass fieldId for field-specific enums or enumSetId for shared enum sets.update_enums — Update enum option name/slug/color/icon.delete_enums — Delete enum options.regenerate_openapi_spec — Regenerate and upload the tenant's OpenAPI spec after data source or field changes. Accepts optional dataSourceSlugs (string array) to limit scope; omit to include all data sources. Returns the publicUrl of the uploaded spec. Call this after anycreate_data_source, update_data_source, delete_data_source, create_fields, update_fields, or delete_fields operation to keep the spec in sync.query_data_source — Read data with filtering, sorting, aggregation, formulas, pivots, child queries. Seereferences/data-source-query-guide.md for complete query syntax.evaluate_jsonata — Test JSONata expressions. Use for validating computed field formulas.get_custom_queries — List non-archived custom queries for the tenant.get_custom_query_by_id — Read full custom query definition (name, description, query, filters).create_custom_query — Create a saved SQL template using Handlebars variables and optional filter definitions.update_custom_query — Update selected fields of an existing custom query (partial update).delete_custom_query — Soft-delete (archive) a custom query.run_custom_query — Execute a saved custom query with runtime filters, pagination offset, and optional simulate mode.Single data source approach:
get_apps to find the target app IDcreate_data_source with title (plural), name (singular), slug (singular snake_case)create_fields with all custom fields (default fields already exist)create_enums with the field ID from step 3regenerate_openapi_spec to update the OpenAPI specBatch approach (recommended for multiple data sources):
get_apps to find the target app ID (optional, defaults to "Default Customizations App")create_data_sources_batch with an array of data source definitions (max 20)
title, name, slug, and fields arrayenumOptions for select/status/tagSelect fieldsrelationDataSourceId to reference other data sources in the same batchregenerate_openapi_spec to update the OpenAPI specget_data_source_metadata to discover field slugs, types, and relationsquery_data_source with appropriate columns, filters, and sortingget_data_source_metadata to see current fieldscreate_fields / update_fields / delete_fields as neededget_enums_by_field_id first, then create_enums / update_enums / delete_enumsregenerate_openapi_spec to update the OpenAPI specget_custom_queries to find an existing query or confirm namingcreate_custom_query with name, query, and optional description/filtersget_custom_query_by_id to verify the saved template and filter definitionsupdate_custom_query for targeted edits (rename, revise SQL template, update filter definitions)delete_custom_query only when archival is explicitly requestedget_custom_query_by_id first to inspect SQL template and available filter slugsfilters with rules[].field values that match the query's filter slugsrun_custom_query with simulate: true for complex or untrusted queries to inspect plan outputrun_custom_query with simulate: false (or omitted) to fetch real dataoffset for pagination and expect a max of 50,000 rows per executiontitle is plural (e.g., "Sales Orders"), name is singular (e.g., "Sales Order"), slug is singular snake_case (e.g., "sales_order")defaultEditFormTarget: "tab" for complex forms, "side" for simple onespluginActivityView for CRM-type data sources (leads, contacts, deals)pluginComments for collaborative data sourcespluginFile when users need to attach files to recordspluginDocyment when users need rich text documents per recordfield-relation requires relationDataSourceId — the ID (UUID) of the related data source, or in batch operations, the slug of another data source in the same batchfield-list is a virtual field showing child records (one-to-many) — not stored in DBfield-select / field-tagSelect / field-status need enum options:
create_fields: call create_enums after field creationcreate_data_sources_batch: include inline enumOptions array in the field definitioncreate_data_sources_batch creates up to 20 data sources in a single transactionslug for relationDataSourceIdrelationDataSourceIdenumOptions arrayenumOptions can specify: name, slug, color, icon, dataSourceId (UUID) to identify which data source to querycolumns is a comma-separated string of field slugs, not an arrayid field for count calculationsrelation_field(sub_field1, sub_field2) selects nested columns...relation_field(alias:sub_field) flattens into root objectrel_{{relation_slug}}/{{field_slug}}today, this_month, All parameters are required in the MCP tool schema (most accept null):
dataSourceId: string (required, non-null)columns: string | nullfilters: object | nullfilterKeyword: string | nullorderBy: array | nulllimit: number | null (default: 1000)offset: number | nullfullCount: boolean | nullrecordId: string | null (fetch single record by ID)calculations: array | nullquery content as a Handlebars SQL template, not static SQL.TENANT_ID, TENANT_SCHEMA, USER_ID, USER_EMAIL, USER_FIRSTNAME, USER_LASTNAME, USER_FULLNAME.{{filter FILTERS.<slug> <column_expression>}} for optional runtime filtering. If no runtime value is provided, the helper resolves to 1=1.query_data_source including columns, filters, orderBy, pagination, calculations, formulas, pivots, child queries, and operator details.get_custom_queries, get_custom_query_by_id, create_custom_query, update_custom_query, delete_custom_query, and run_custom_query.Weekly Installs
61
Repository
GitHub Stars
13
First Seen
Feb 14, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex60
opencode59
gemini-cli58
claude-code58
amp58
github-copilot58
lark-cli 共享规则:飞书资源操作指南与权限配置详解
39,000 周安装
Feishu Docx Exporter:飞书/Lark文档转Markdown工具,支持AI分析、批量导出与内容管理
272 周安装
阿里云AI音频TTS语音设计测试技能 - 最小可行性测试与验证指南
272 周安装
SwiftData 教程:iOS 17+ 原生持久化框架,与 SwiftUI 集成和 CloudKit 同步
275 周安装
阿里云AI语音TTS测试技能 - 最小可行测试验证与安装指南
274 周安装
阿里云DNS CLI测试指南:alicloud-network-dns-cli-test 安装与使用教程
273 周安装
网络小说大纲规划工具 - 从总纲到卷章细纲的AI辅助写作技能
71 周安装
update_data_source — Update data source properties.delete_data_source — Delete a data source and all its data.field-formula uses JSONata expressions — test with evaluate_jsonata firstfield-inlineData stores array of objects, field-inlineForm stores single nested objectslug must be snake_case matching ^[a-z][a-z0-9_]*$slug must be snake_case matching ^[a-z][a-z0-9_]*$ (auto-generated from name if not provided)sortOrderlast_30_daysdistinctColumns: array | nullformulas: array | nullchildQueries: array | nullpivot: object | nullfilters definitions in create_custom_query / update_custom_query aligned with template usage:
FILTERS.<slug><slug><slug>simulate: true before running expensive queries to inspect EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) output.run_custom_query: 50,000 row cap, 15s timeout for normal execution, 30s timeout for simulate mode.delete_custom_query as an archival action (soft delete), not permanent deletion.(table_alias."data"->>'field-uuid')::type.