@lightdash/common 1.142.0 → 1.143.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/ee/AiAgent/schemas/defineTool.test.js +1 -0
  3. package/dist/cjs/ee/AiAgent/schemas/defineTool.test.js.map +1 -1
  4. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +124 -0
  5. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
  6. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.js +58 -13
  7. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
  8. package/dist/cjs/schemas/json/mcp-tools-1.0.json +170 -12
  9. package/dist/esm/.tsbuildinfo +1 -1
  10. package/dist/esm/ee/AiAgent/schemas/defineTool.test.js +1 -0
  11. package/dist/esm/ee/AiAgent/schemas/defineTool.test.js.map +1 -1
  12. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +124 -0
  13. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
  14. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.js +57 -12
  15. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
  16. package/dist/esm/schemas/json/mcp-tools-1.0.json +170 -12
  17. package/dist/types/.tsbuildinfo +1 -1
  18. package/dist/types/ee/AiAgent/schemas/defineTool.test.js +1 -0
  19. package/dist/types/ee/AiAgent/schemas/defineTool.test.js.map +1 -1
  20. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +124 -0
  21. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
  22. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.js +57 -12
  23. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
  24. package/dist/types/schemas/json/mcp-tools-1.0.json +170 -12
  25. package/package.json +1 -1
@@ -8,7 +8,7 @@
8
8
  "openWorldHint": false,
9
9
  "readOnlyHint": false
10
10
  },
11
- "description": "Clear the active AI agent from context. After clearing, tool calls will no longer be scoped to a specific agent's explores, tags, or instructions. The active project is preserved.",
11
+ "description": "@deprecated Omit agentUuid from scoped tool calls instead. Clears legacy shared agent context for older clients only.",
12
12
  "inputSchema": {
13
13
  "$schema": "http://json-schema.org/draft-07/schema#",
14
14
  "additionalProperties": false,
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "name": "clear_agent",
19
19
  "outputSchema": null,
20
- "title": "Clear agent"
20
+ "title": "Clear agent (deprecated)"
21
21
  },
22
22
  {
23
23
  "annotations": {
@@ -868,7 +868,165 @@
868
868
  "openWorldHint": false,
869
869
  "readOnlyHint": true
870
870
  },
871
- "description": "Get the currently active AI agent with its full context: explores it has access to, space restrictions, verified questions (curated example queries), and custom instructions. The active agent is usually established by route_agent; use this to inspect the current automatic or manually overridden selection before making data queries.",
871
+ "description": "Call this first to discover available projects, the agents you can access in each project, and Lightdash-configured context. Pass the selected projectUuid to every project-scoped tool call and an available agentUuid when agent-specific scope is desired. This tool reports context but does not establish implicit execution state.",
872
+ "inputSchema": {
873
+ "$schema": "http://json-schema.org/draft-07/schema#",
874
+ "additionalProperties": false,
875
+ "properties": {},
876
+ "type": "object"
877
+ },
878
+ "name": "get_context",
879
+ "outputSchema": {
880
+ "$schema": "http://json-schema.org/draft-07/schema#",
881
+ "additionalProperties": false,
882
+ "properties": {
883
+ "activeAgent": {
884
+ "anyOf": [
885
+ {
886
+ "additionalProperties": false,
887
+ "properties": {
888
+ "agentName": {
889
+ "type": "string"
890
+ },
891
+ "agentUuid": {
892
+ "type": "string"
893
+ },
894
+ "projectUuid": {
895
+ "type": "string"
896
+ }
897
+ },
898
+ "required": [
899
+ "agentUuid",
900
+ "agentName",
901
+ "projectUuid"
902
+ ],
903
+ "type": "object"
904
+ },
905
+ {
906
+ "type": "null"
907
+ }
908
+ ]
909
+ },
910
+ "activeProject": {
911
+ "anyOf": [
912
+ {
913
+ "additionalProperties": false,
914
+ "properties": {
915
+ "projectName": {
916
+ "type": "string"
917
+ },
918
+ "projectUuid": {
919
+ "type": "string"
920
+ },
921
+ "selectedTags": {
922
+ "anyOf": [
923
+ {
924
+ "items": {
925
+ "type": "string"
926
+ },
927
+ "type": "array"
928
+ },
929
+ {
930
+ "type": "null"
931
+ }
932
+ ]
933
+ }
934
+ },
935
+ "required": [
936
+ "projectUuid",
937
+ "projectName",
938
+ "selectedTags"
939
+ ],
940
+ "type": "object"
941
+ },
942
+ {
943
+ "type": "null"
944
+ }
945
+ ]
946
+ },
947
+ "availableProjects": {
948
+ "items": {
949
+ "additionalProperties": false,
950
+ "properties": {
951
+ "availableAgents": {
952
+ "items": {
953
+ "additionalProperties": false,
954
+ "properties": {
955
+ "agentUuid": {
956
+ "type": "string"
957
+ },
958
+ "description": {
959
+ "type": ["string", "null"]
960
+ },
961
+ "name": {
962
+ "type": "string"
963
+ },
964
+ "tags": {
965
+ "anyOf": [
966
+ {
967
+ "items": {
968
+ "type": "string"
969
+ },
970
+ "type": "array"
971
+ },
972
+ {
973
+ "type": "null"
974
+ }
975
+ ]
976
+ }
977
+ },
978
+ "required": [
979
+ "agentUuid",
980
+ "name",
981
+ "description",
982
+ "tags"
983
+ ],
984
+ "type": "object"
985
+ },
986
+ "type": "array"
987
+ },
988
+ "expiresAt": {
989
+ "type": ["string", "null"]
990
+ },
991
+ "name": {
992
+ "type": "string"
993
+ },
994
+ "projectUuid": {
995
+ "type": "string"
996
+ },
997
+ "type": {
998
+ "type": "string"
999
+ }
1000
+ },
1001
+ "required": [
1002
+ "projectUuid",
1003
+ "name",
1004
+ "type",
1005
+ "expiresAt",
1006
+ "availableAgents"
1007
+ ],
1008
+ "type": "object"
1009
+ },
1010
+ "type": "array"
1011
+ }
1012
+ },
1013
+ "required": [
1014
+ "activeProject",
1015
+ "activeAgent",
1016
+ "availableProjects"
1017
+ ],
1018
+ "type": "object"
1019
+ },
1020
+ "title": "Get context"
1021
+ },
1022
+ {
1023
+ "annotations": {
1024
+ "destructiveHint": false,
1025
+ "idempotentHint": true,
1026
+ "openWorldHint": false,
1027
+ "readOnlyHint": true
1028
+ },
1029
+ "description": "@deprecated Use get_context for legacy configured context or route_agent for an explicit agent selection.",
872
1030
  "inputSchema": {
873
1031
  "$schema": "http://json-schema.org/draft-07/schema#",
874
1032
  "additionalProperties": false,
@@ -877,7 +1035,7 @@
877
1035
  },
878
1036
  "name": "get_current_agent",
879
1037
  "outputSchema": null,
880
- "title": "Get current agent"
1038
+ "title": "Get current agent (deprecated)"
881
1039
  },
882
1040
  {
883
1041
  "annotations": {
@@ -886,7 +1044,7 @@
886
1044
  "openWorldHint": false,
887
1045
  "readOnlyHint": true
888
1046
  },
889
- "description": "Get the currently active project and its configuration. Returns the project UUID, name, and any selected tags. Use this to verify context before calling data tools.",
1047
+ "description": "@deprecated Use get_context instead. Returns legacy shared project context for older clients.",
890
1048
  "inputSchema": {
891
1049
  "$schema": "http://json-schema.org/draft-07/schema#",
892
1050
  "additionalProperties": false,
@@ -895,7 +1053,7 @@
895
1053
  },
896
1054
  "name": "get_current_project",
897
1055
  "outputSchema": null,
898
- "title": "Get current project"
1056
+ "title": "Get current project (deprecated)"
899
1057
  },
900
1058
  {
901
1059
  "annotations": {
@@ -1893,7 +2051,7 @@
1893
2051
  "openWorldHint": false,
1894
2052
  "readOnlyHint": true
1895
2053
  },
1896
- "description": "List accessible AI agents for the active project. Optionally filter by project UUID. Each agent is pre-configured with specific explores, tags, verified questions, and instructions that define its domain expertise. Prefer route_agent for automatic selection; use this tool when you need to inspect candidates or choose one manually before calling set_agent.",
2054
+ "description": "List accessible AI agents for the required projectUuid. Each agent is pre-configured with specific explores, tags, verified questions, and instructions that define its domain expertise. Prefer route_agent for automatic selection.",
1897
2055
  "inputSchema": {
1898
2056
  "$schema": "http://json-schema.org/draft-07/schema#",
1899
2057
  "additionalProperties": false,
@@ -1961,7 +2119,7 @@
1961
2119
  "openWorldHint": false,
1962
2120
  "readOnlyHint": true
1963
2121
  },
1964
- "description": "List all accessible projects in the organization. Projects contain explores, fields, and content. Use this to discover available projects before calling set_project to select one as the active context for subsequent operations. Each project includes a \"type\": prefer DEFAULT projects, which are live production environments. PREVIEW projects are ephemeral CI/PR environments that may be decommissioned — their warehouse credentials are often gone, so queries can fail with 403 errors even when the schema is still visible. Only select a PREVIEW project if the user explicitly asks for it.",
2122
+ "description": "List all accessible projects in the organization. Projects contain explores, fields, and content. Prefer get_context for bootstrap, then pass the selected projectUuid explicitly to every project-scoped operation. Each project includes a \"type\": prefer DEFAULT projects, which are live production environments. PREVIEW projects are ephemeral CI/PR environments that may be decommissioned — their warehouse credentials are often gone, so queries can fail with 403 errors even when the schema is still visible. Only select a PREVIEW project if the user explicitly asks for it.",
1965
2123
  "inputSchema": {
1966
2124
  "$schema": "http://json-schema.org/draft-07/schema#",
1967
2125
  "additionalProperties": false,
@@ -2087,7 +2245,7 @@
2087
2245
  "openWorldHint": false,
2088
2246
  "readOnlyHint": true
2089
2247
  },
2090
- "description": "List all verified charts and dashboards in the active project. Verified content has been reviewed and marked as trusted — use this to discover reference examples of sanctioned metrics and visualizations when building new content. Requires an active project set via set_project. Each item includes contentType (chart or dashboard), contentUuid, name, description, space, view count, last update time, and verification metadata (who verified it and when); charts also include chartKind and exploreName. To learn the full structure of a verified item (dimensions, metrics, filters), drill into it with find_content or MCP schema-discovery tools on its explore.",
2248
+ "description": "List all verified charts and dashboards in the required projectUuid. Verified content has been reviewed and marked as trusted — use this to discover reference examples of sanctioned metrics and visualizations when building new content. Each item includes contentType (chart or dashboard), contentUuid, name, description, space, view count, last update time, and verification metadata (who verified it and when); charts also include chartKind and exploreName. To learn the full structure of a verified item (dimensions, metrics, filters), drill into it with find_content or MCP schema-discovery tools on its explore.",
2091
2249
  "inputSchema": {
2092
2250
  "$schema": "http://json-schema.org/draft-07/schema#",
2093
2251
  "additionalProperties": false,
@@ -2538,7 +2696,7 @@
2538
2696
  "openWorldHint": false,
2539
2697
  "readOnlyHint": false
2540
2698
  },
2541
- "description": "Automatically select and activate the best AI agent for a user request within the active project. Call this at the start of each new user request after setting project context. Returns routing metadata plus the selected agent context; use set_agent only when you want to override the automatic choice manually.",
2699
+ "description": "Select the best AI agent for a user request within the required projectUuid when agent-specific scope is useful and routing is available. Pass the returned agentUuid explicitly to subsequent scoped tools. If routing is unavailable, use list_agents and set_agent for manual selection; omit agentUuid when full project scope is desired. Also updates shared agent context for clients that use it.",
2542
2700
  "inputSchema": {
2543
2701
  "$schema": "http://json-schema.org/draft-07/schema#",
2544
2702
  "additionalProperties": false,
@@ -7786,7 +7944,7 @@
7786
7944
  "openWorldHint": false,
7787
7945
  "readOnlyHint": false
7788
7946
  },
7789
- "description": "Manually set the active AI agent for the active project. Prefer route_agent for default automatic selection; use this when you need to override that choice explicitly. Returns the agent's full context including: explores it has access to, space restrictions, verified questions (curated example queries that demonstrate correct usage of the data model), and custom instructions. Use this context to guide subsequent tool calls — prefer the agent's explores when calling MCP schema-discovery tools, reference verified questions as patterns for building queries with run_metric_query, and follow the agent's instructions for domain-specific conventions.",
7947
+ "description": "Manually select an AI agent for the required projectUuid. Prefer route_agent for default automatic selection; use this when you need to override that choice explicitly. Returns the agent's full context including: explores it has access to, space restrictions, verified questions (curated example queries that demonstrate correct usage of the data model), and custom instructions. Pass the agentUuid explicitly to subsequent scoped tools and use this context to guide them — prefer the agent's explores when calling MCP schema-discovery tools, reference verified questions as patterns for building queries with run_metric_query, and follow the agent's instructions for domain-specific conventions.",
7790
7948
  "inputSchema": {
7791
7949
  "$schema": "http://json-schema.org/draft-07/schema#",
7792
7950
  "additionalProperties": false,
@@ -7809,7 +7967,7 @@
7809
7967
  "openWorldHint": false,
7810
7968
  "readOnlyHint": false
7811
7969
  },
7812
- "description": "Set the active project for all subsequent MCP operations. Most tools (list_explores, MCP schema-discovery tools, run_metric_query, etc.) require an active project. Setting a project clears any previously selected agent, since agents are scoped to a project. After setting a project, prefer route_agent to auto-select the best agent for each request; use list_agents and set_agent only for manual override.",
7970
+ "description": "Set the configured project context. Most tools (list_explores, MCP schema-discovery tools, run_metric_query, etc.) also require its projectUuid explicitly. Setting a project clears any previously selected agent, since agents are scoped to a project. After setting a project, prefer route_agent to auto-select the best agent for each request and pass its returned agentUuid explicitly to subsequent scoped tools; use list_agents and set_agent only for manual override.",
7813
7971
  "inputSchema": {
7814
7972
  "$schema": "http://json-schema.org/draft-07/schema#",
7815
7973
  "additionalProperties": false,