Files
n8n/docs/generated/postgres-schema/public.mcp_server_tool_call.md

6.8 KiB
Generated

public.mcp_server_tool_call

Columns

Name Type Default Nullable Children Parents Comment
clientName varchar(255) false Snapshot of the OAuth client name at call time, e.g. "Claude Code"
durationMs integer false Duration of the tool call in milliseconds
errorMessage text true Safe error summary returned for a failed call. NULL on success
executionId varchar(36) true Workflow execution ID when a workflow run started. NULL otherwise
id integer false
oauthClientId varchar true public.oauth_clients OAuth client that called the tool. NULL when unavailable or deleted
serverId uuid false public.mcp_server
startedAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false When the tool call started
status varchar(16) false Outcome of the tool call: success, error, or unfinished (the run outlived the call)
targetId varchar(36) true ID of the target workflow, agent, or skill at call time. NULL for a node tool
toolId uuid true public.mcp_server_tool Tool row at call time. NULL when the tool was removed
toolKind varchar(16) false What the tool ran: a workflow, a node, an agent, or a skill
toolName varchar(64) false Snapshot of the tool name at call time
userId uuid true public.user Person who called the tool. NULL after the user is deleted

Constraints

Name Type Definition
CHK_mcp_server_tool_call_status CHECK CHECK (((status)::text = ANY ((ARRAY['success'::character varying, 'error'::character varying, 'unfinished'::character varying])::text[])))
CHK_mcp_server_tool_call_toolKind CHECK CHECK ((("toolKind")::text = ANY ((ARRAY['workflow'::character varying, 'node'::character varying, 'agent'::character varying, 'skill'::character varying])::text[])))
FK_18ad188e9975d252128e1097007 FOREIGN KEY FOREIGN KEY ("toolId") REFERENCES mcp_server_tool(id) ON DELETE SET NULL
FK_29fac15a0c61fd77fe2c0b5bf44 FOREIGN KEY FOREIGN KEY ("oauthClientId") REFERENCES oauth_clients(id) ON DELETE SET NULL
FK_44f4821858f73c1871d000f8e7a FOREIGN KEY FOREIGN KEY ("serverId") REFERENCES mcp_server(id) ON DELETE CASCADE
FK_6c1ca8e2b27fda7624b2e0888d7 FOREIGN KEY FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE SET NULL
PK_b63c0a77d5906cc5e77436584f7 PRIMARY KEY PRIMARY KEY (id)
mcp_server_tool_call_clientName_not_null n NOT NULL "clientName"
mcp_server_tool_call_durationMs_not_null n NOT NULL "durationMs"
mcp_server_tool_call_id_not_null n NOT NULL id
mcp_server_tool_call_serverId_not_null n NOT NULL "serverId"
mcp_server_tool_call_startedAt_not_null n NOT NULL "startedAt"
mcp_server_tool_call_status_not_null n NOT NULL status
mcp_server_tool_call_toolKind_not_null n NOT NULL "toolKind"
mcp_server_tool_call_toolName_not_null n NOT NULL "toolName"

Indexes

Name Definition
IDX_110df42f5591dbb48d0bbda4ec CREATE INDEX "IDX_110df42f5591dbb48d0bbda4ec" ON public.mcp_server_tool_call USING btree ("serverId", "startedAt", id)
IDX_18ad188e9975d252128e109700 CREATE INDEX "IDX_18ad188e9975d252128e109700" ON public.mcp_server_tool_call USING btree ("toolId")
IDX_29fac15a0c61fd77fe2c0b5bf4 CREATE INDEX "IDX_29fac15a0c61fd77fe2c0b5bf4" ON public.mcp_server_tool_call USING btree ("oauthClientId")
IDX_44155d3ec8733193ec47d233ac CREATE INDEX "IDX_44155d3ec8733193ec47d233ac" ON public.mcp_server_tool_call USING btree ("serverId", status, id)
IDX_6c1ca8e2b27fda7624b2e0888d CREATE INDEX "IDX_6c1ca8e2b27fda7624b2e0888d" ON public.mcp_server_tool_call USING btree ("userId")
IDX_7f42993460a22186d3c6e6926b CREATE INDEX "IDX_7f42993460a22186d3c6e6926b" ON public.mcp_server_tool_call USING btree ("serverId", "durationMs", id)
IDX_8e6ac48653f0e81a3a1c2adb2e CREATE INDEX "IDX_8e6ac48653f0e81a3a1c2adb2e" ON public.mcp_server_tool_call USING btree ("startedAt")
IDX_d9f0af248f53a307dda2cb3001 CREATE INDEX "IDX_d9f0af248f53a307dda2cb3001" ON public.mcp_server_tool_call USING btree ("serverId", "toolName", id)
PK_b63c0a77d5906cc5e77436584f7 CREATE UNIQUE INDEX "PK_b63c0a77d5906cc5e77436584f7" ON public.mcp_server_tool_call USING btree (id)

Relations

erDiagram

"public.mcp_server_tool_call" }o--o| "public.oauth_clients" : "FOREIGN KEY (#quot;oauthClientId#quot;) REFERENCES oauth_clients(id) ON DELETE SET NULL"
"public.mcp_server_tool_call" }o--|| "public.mcp_server" : "FOREIGN KEY (#quot;serverId#quot;) REFERENCES mcp_server(id) ON DELETE CASCADE"
"public.mcp_server_tool_call" }o--o| "public.mcp_server_tool" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES mcp_server_tool(id) ON DELETE SET NULL"
"public.mcp_server_tool_call" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"

"public.mcp_server_tool_call" {
  varchar_255_ clientName
  integer durationMs
  text errorMessage
  varchar_36_ executionId
  integer id
  varchar oauthClientId FK
  uuid serverId FK
  timestamp_3__with_time_zone startedAt
  varchar_16_ status
  varchar_36_ targetId
  uuid toolId FK
  varchar_16_ toolKind
  varchar_64_ toolName
  uuid userId FK
}
"public.oauth_clients" {
  varchar_255_ clientSecret
  bigint clientSecretExpiresAt
  timestamp_3__with_time_zone createdAt
  json grantTypes
  varchar id
  boolean isFirstParty
  varchar_255_ name
  json redirectUris
  uuid serviceAccountId FK
  varchar_255_ tokenEndpointAuthMethod
  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
}
"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.user" {
  timestamp_3__with_time_zone createdAt
  boolean disabled
  varchar_255_ email
  varchar_32_ firstName
  uuid id
  varchar_16_ kind
  date lastActiveAt
  varchar_32_ lastName
  boolean mfaEnabled
  text mfaRecoveryCodes
  text mfaSecret
  varchar_255_ password
  json personalizationAnswers
  varchar_128_ roleSlug FK
  integer sessionGeneration
  json settings
  timestamp_3__with_time_zone updatedAt
}

Generated by tbls