You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: schemas/dab.draft.schema.json
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -280,6 +280,10 @@
280
280
"description": "Allow enabling/disabling MCP requests for all entities.",
281
281
"default": true
282
282
},
283
+
"description": {
284
+
"type": "string",
285
+
"description": "Description of the MCP server, exposed as the 'instructions' field in the MCP initialize response to provide behavioral context to MCP clients and agents."
286
+
},
283
287
"dml-tools": {
284
288
"description": "Configuration for MCP Data Manipulation Language (DML) tools. Set to true/false to enable/disable all tools, or use an object to configure individual tools.",
+"WORKFLOW: 1) Call describe_entities first to get entity names and field names. "
49
-
+"2) Call this tool with entity, function, and field from step 1. "
50
-
+"RULES: field '*' is ONLY valid with count. "
51
-
+"orderby, having, first, and after ONLY apply when groupby is provided. "
52
-
+"RESPONSE: Result is aliased as '{function}_{field}' (e.g. avg_unitPrice). "
53
-
+"For count(*), the alias is 'count'. "
54
-
+"With groupby and first, response includes items, endCursor, and hasNextPage for pagination.",
48
+
+"Prerequisite: 1) Call describe_entities in the current session to discover valid entity names and field names. "
49
+
+"2) Call this tool using only names returned by that call. "
50
+
+"Do not use entity or field names from memory, prior conversations, or assumptions. "
51
+
+"count supports field * to count all rows. "
52
+
+"avg, sum, min, and max must reference a field with a numeric data type as returned by describe_entities. "
53
+
+"distinct removes duplicate values before aggregation and is not valid with field *. "
54
+
+"filter applies an OData WHERE clause before aggregation. Supported operators: eq, ne, gt, ge, lt, le, and, or, not. "
55
+
+"String pattern operators such as startswith, endswith, contains, and regex are NOT supported. "
56
+
+"Use groupby to compute aggregated rows per group. All groupby fields must exist on the entity and must be discovered through describe_entities. "
57
+
+"Grouped results include the groupby fields and the aggregated value. "
58
+
+"orderby, having, first, and after apply only when groupby is present. "
59
+
+"orderby controls the sort direction of groups based on the aggregation result value. Allowed values are 'asc' and 'desc'; if omitted, 'desc' is used. It cannot sort by entity fields. "
60
+
+"having filters groups based on the aggregated value produced by the function. Supported operators: eq, neq, gt, gte, lt, lte, in. "
61
+
+"When groupby and first are used together, the response includes items, endCursor, and hasNextPage. "
62
+
+"To retrieve the next page, pass the returned endCursor value as the after parameter in a subsequent call with the same inputs. "
63
+
+"Aggregated values are aliased as {function}_{field} (example: avg_unitPrice). "
64
+
+"count(*) is the sole exception to this pattern and returns the alias 'count', not count_*. "
65
+
+"If the call fails due to an unrecognized entity or field name, call describe_entities again to verify valid names, then retry with corrected inputs.",
@@ -67,32 +78,32 @@ public class AggregateRecordsTool : IMcpTool
67
78
},
68
79
""field"": {
69
80
""type"": ""string"",
70
-
""description"": ""Field name to aggregate, or '*' with count to count all rows.""
81
+
""description"": ""Field name to aggregate, or * with count to count all rows.""
71
82
},
72
83
""distinct"": {
73
84
""type"": ""boolean"",
74
-
""description"": ""Remove duplicate values before aggregating. Not valid with field '*'."",
85
+
""description"": ""Remove duplicate values before aggregating. Not valid with field *."",
75
86
""default"": false
76
87
},
77
88
""filter"": {
78
89
""type"": ""string"",
79
-
""description"": ""OData WHERE clause applied before aggregating. Operators: eq, ne, gt, ge, lt, le, and, or, not. Example: 'unitPrice lt 10'."",
90
+
""description"": ""OData WHERE clause applied before aggregating. Operators: eq, ne, gt, ge, lt, le, and, or, not. String pattern operators such as startswith, endswith, contains, and regex are not supported. Example: unitPrice lt 10."",
80
91
""default"": """"
81
92
},
82
93
""groupby"": {
83
94
""type"": ""array"",
84
95
""items"": { ""type"": ""string"" },
85
-
""description"": ""Field names to group by. Each unique combination produces one aggregated row. Enables orderby, having, first, and after."",
96
+
""description"": ""Field names to group by. Each unique combination produces one aggregated row that includes the group fields and the aggregated value. Enables orderby, having, first, and after."",
86
97
""default"": []
87
98
},
88
99
""orderby"": {
89
100
""type"": ""string"",
90
101
""enum"": [""asc"", ""desc""],
91
-
""description"": ""Sort direction for grouped results by the aggregated value. Only applies when groupby is provided; ignored otherwise.""
102
+
""description"": ""Sort direction for grouped results by the aggregated value (ascending or descending). Requires groupby. Cannot sort by entity fields. If omitted, the default sort direction is used.""
92
103
},
93
104
""having"": {
94
105
""type"": ""object"",
95
-
""description"": ""Filter groups by the aggregated value (HAVING clause). Requires groupby. Multiple operators are AND-ed."",
106
+
""description"": ""Filter groups by the aggregated value (HAVING clause). Supported operators: eq, neq, gt, gte, lt, lte, in. Requires groupby. Multiple operators are AND-ed."",
_logger.LogError("Autoentities simulation is only supported for MSSQL databases. Current database type: {DatabaseType}.",runtimeConfig.DataSource.DatabaseType);
3291
+
_logger.LogError("The autoentities simulation is only supported for MSSQL databases. Current database type: {DatabaseType}.",runtimeConfig.DataSource.DatabaseType);
3292
3292
returnfalse;
3293
3293
}
3294
3294
@@ -3380,7 +3380,7 @@ public static bool TrySimulateAutoentities(AutoConfigSimulateOptions options, Fi
3380
3380
/// <param name="results">The simulation results keyed by filter (definition) name.</param>
// CancellationToken is passed to ExecuteReaderAsync to ensure that if the client times out while the query is executing, the execution will be cancelled and resources will be freed up.
_logger.LogError("Skipping autoentity generation: entity_nameor object is null or empty for autoentity pattern '{AutoentityName}'.",autoentityName);
332
+
_logger.LogError("Skipping autoentity generation: 'entity_name', 'object', or 'schema' is null or empty for autoentities definition '{autoentityName}'.",autoentityName);
Copy file name to clipboardExpand all lines: src/Service.Tests/Configuration/ConfigurationTests.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5608,7 +5608,7 @@ public async Task TestAutoentitiesAreGeneratedIntoEntities(bool useEntities, int
5608
5608
/// <returns></returns>
5609
5609
[TestCategory(TestCategory.MSSQL)]
5610
5610
[DataTestMethod]
5611
-
[DataRow("publishers","uniqueSingularPublisher","uniquePluralPublishers","/unique/publisher","Entity with name 'publishers' already exists. Cannot create new entity from autoentity pattern with definition-name 'PublisherAutoEntity'.",DisplayName="Autoentities fail due to entity name")]
5611
+
[DataRow("publishers","uniqueSingularPublisher","uniquePluralPublishers","/unique/publisher","Entity with name 'publishers' already exists. Cannot create new entity from autoentities definition 'PublisherAutoEntity'.",DisplayName="Autoentities fail due to entity name")]
5612
5612
[DataRow("UniquePublisher","publishers","uniquePluralPublishers","/unique/publisher","Entity publishers generates queries/mutation that already exist",DisplayName="Autoentities fail due to graphql singular type")]
5613
5613
[DataRow("UniquePublisher","uniqueSingularPublisher","publishers","/unique/publisher","Entity publishers generates queries/mutation that already exist",DisplayName="Autoentities fail due to graphql plural type")]
5614
5614
[DataRow("UniquePublisher","uniqueSingularPublisher","uniquePluralPublishers","/publishers","The rest path: publishers specified for entity: publishers is already used by another entity.",DisplayName="Autoentities fail due to rest path")]
0 commit comments