Commit 71cc01f
authored
DH-21947: MCP data tool fixes
- `getTableData` now supports hierarchical tables. The crux of the fix
is in `getTableOrError` which now finds the variable to use the proper
object type for the `getObject` call
- fixed an output schema error with `connectToServer` tool
Rest of the PR is mostly just updating tool dependencies + cleaning up
tests.
## Testing
Create a rollup table. I used:
```py
from deephaven import new_table
from deephaven.column import string_col, int_col, double_col
# Create hierarchical test data
sales_data = new_table([
string_col("Region", ["North", "North", "North", "North", "South", "South", "South", "East", "East", "West"]),
string_col("State", ["NY", "NY", "MA", "MA", "TX", "TX", "FL", "PA", "NJ", "CA"]),
string_col("City", ["NYC", "Albany", "Boston", "Cambridge", "Houston", "Dallas", "Miami", "Philly", "Newark", "LA"]),
int_col("Sales", [1000, 500, 800, 600, 1200, 900, 700, 850, 650, 1100]),
double_col("Revenue", [10000.0, 5000.0, 8000.0, 6000.0, 12000.0, 9000.0, 7000.0, 8500.0, 6500.0, 11000.0])
])
```
Ask the agent to get data from the `sales_data` table. It should return
the data matching the table.
1 parent 9131f21 commit 71cc01f
15 files changed
Lines changed: 859 additions & 563 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
| 1069 | + | |
1069 | 1070 | | |
1070 | 1071 | | |
1071 | 1072 | | |
| |||
1076 | 1077 | | |
1077 | 1078 | | |
1078 | 1079 | | |
| 1080 | + | |
1079 | 1081 | | |
1080 | 1082 | | |
1081 | 1083 | | |
1082 | 1084 | | |
| 1085 | + | |
1083 | 1086 | | |
1084 | 1087 | | |
1085 | 1088 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
0 commit comments