public.mcp_server_tool¶
列¶
| 名称 | 类型 | 默认值 | 可空 | 子表 | 父表 | 注释 |
|---|---|---|---|---|---|---|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| description | text | ''::text | false | |||
| draftSource | varchar(16) | 'defaults'::character varying | false | 谁编写了工具文本:AI 草稿、目标默认值,还是构建者 | ||
| id | uuid | false | UUIDv7,由应用程序生成 | |||
| kind | varchar(16) | false | 工具运行的内容:工作流、节点、智能体或技能 | |||
| position | integer | 0 | false | 工具在服务器中的顺序 | ||
| serverId | uuid | false | public.mcp_server | |||
| targetId | varchar(36) | true | 工作流、智能体或技能的 ID。节点工具为 NULL | |||
| toolData | json | true | 工作流工具的固定输入值,或节点工具的节点定义。当工具没有这些时,为 NULL | |||
| toolName | varchar(64) | false | 客户端看到的名称。在服务器内唯一 | |||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |
约束¶
| 名称 | 类型 | 定义 |
|---|---|---|
| CHK_mcp_server_tool_draftSource | CHECK | CHECK ((("draftSource")::text = ANY ((ARRAY['ai'::character varying, 'defaults'::character varying, 'edited'::character varying])::text[]))) |
| CHK_mcp_server_tool_kind | CHECK | CHECK (((kind)::text = ANY ((ARRAY['workflow'::character varying, 'node'::character varying, 'agent'::character varying, 'skill'::character varying])::text[]))) |
| FK_7b01d158967aa247f8d3b3b89dd | FOREIGN KEY | FOREIGN KEY ("serverId") REFERENCES mcp_server(id) ON DELETE CASCADE |
| PK_2b0bacf1aff9c11c7e7a1fdf0e0 | PRIMARY KEY | PRIMARY KEY (id) |
| mcp_server_tool_createdAt_not_null | n | NOT NULL "createdAt" |
| mcp_server_tool_description_not_null | n | NOT NULL description |
| mcp_server_tool_draftSource_not_null | n | NOT NULL "draftSource" |
| mcp_server_tool_id_not_null | n | NOT NULL id |
| mcp_server_tool_kind_not_null | n | NOT NULL kind |
| mcp_server_tool_position_not_null | n | NOT NULL "position" |
| mcp_server_tool_serverId_not_null | n | NOT NULL "serverId" |
| mcp_server_tool_toolName_not_null | n | NOT NULL "toolName" |
| mcp_server_tool_updatedAt_not_null | n | NOT NULL "updatedAt" |
索引¶
| 名称 | 定义 |
|---|---|
| IDX_d8f9b66a9b644c56d021f90395 | CREATE UNIQUE INDEX "IDX_d8f9b66a9b644c56d021f90395" ON public.mcp_server_tool USING btree ("serverId", "toolName") |
| PK_2b0bacf1aff9c11c7e7a1fdf0e0 | CREATE UNIQUE INDEX "PK_2b0bacf1aff9c11c7e7a1fdf0e0" ON public.mcp_server_tool USING btree (id) |
关系¶
erDiagram
"public.mcp_server_tool" }o--|| "public.mcp_server" : "FOREIGN KEY (#quot;serverId#quot;) REFERENCES mcp_server(id) ON DELETE CASCADE"
"public.mcp_server_tool" {
timestamp_3__with_time_zone createdAt
text description
varchar_16_ draftSource
uuid id
varchar_16_ kind
integer position
uuid serverId FK
varchar_36_ targetId
json toolData
varchar_64_ toolName
timestamp_3__with_time_zone updatedAt
}
"public.mcp_server" {
timestamp_3__with_time_zone createdAt
uuid createdById FK
timestamp_3__with_time_zone deletedAt
text description
uuid id
varchar_128_ name
varchar_36_ projectId FK
varchar_128_ slug
timestamp_3__with_time_zone updatedAt
}由 tbls 生成
本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 n8/n8n