What?
Can't do a simple count.
desired behavior
select count(*)
from my_table
tool schema
{
"tools": [
{
"name": "aggregate_records",
"inputSchema": {
"type": "object",
"properties": {
[snip]
"orderby": {
"type": "string",
"enum": [ // this is the problem.
"asc",
"desc"
],
"description": "Sort grouped results by the aggregated value. Requires groupby.",
"default": "desc" // should the default be none unless there is a group by?
},
}
}
}
The tool does not allow NOT sorting. This is a problem because with orderby then a groupby is required. But when you are doing a simple count a groupby is inappropriate.
Input
{
"entity": "Category",
"function": "count",
"field": "*",
"distinct": false,
"filter": "",
"groupby": [],
"orderby": "desc" // this is an enum, so required
}
This will result in a failure because it has orderby but does not have groupby.
Output
{
"toolName": "aggregate_records",
"status": "error",
"error": {
"type": "InvalidArguments",
"message": "The 'orderby' parameter requires 'groupby' to be specified. Sorting applies to grouped aggregation results."
}
}
What?
Can't do a simple count.
desired behavior
tool schema
{ "tools": [ { "name": "aggregate_records", "inputSchema": { "type": "object", "properties": { [snip] "orderby": { "type": "string", "enum": [ // this is the problem. "asc", "desc" ], "description": "Sort grouped results by the aggregated value. Requires groupby.", "default": "desc" // should the default be none unless there is a group by? }, } } }The tool does not allow NOT sorting. This is a problem because with
orderbythen agroupbyis required. But when you are doing a simplecountagroupbyis inappropriate.Input
{ "entity": "Category", "function": "count", "field": "*", "distinct": false, "filter": "", "groupby": [], "orderby": "desc" // this is an enum, so required }This will result in a failure because it has
orderbybut does not havegroupby.Output
{ "toolName": "aggregate_records", "status": "error", "error": { "type": "InvalidArguments", "message": "The 'orderby' parameter requires 'groupby' to be specified. Sorting applies to grouped aggregation results." } }