Repository navigation
Make find_rows and row ID tools report what really happened (v1.9.5) - #27
Merged
Merged
Conversation
A model passed where as a JSON string. normalizeWhere let it through, evalWhere then rejected every row, and the empty result read like a real answer: the model went on to search other tables. A JSON string now counts as the object it contains, and anything else that isn't an object is an error. The same request started with get_row and an auto-number value as row_id. Its description now says that row_id is the internal _id and how to find it by a column value, and so does the error from SeaTable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A malformed condition or an unknown column also matched no row without a word. find_rows now reports unknown operators, missing fields or values, an empty "or" and unknown columns in where and order_by, naming the existing columns. A column only the rows know still counts, as the metadata is cached. All tools that take a row ID now say that it is the internal _id and how to find it, and the server adds the same note to SeaTable's error for an unknown row instead of get_row alone. Checked against a real base: the note, a where passed as a string, an unknown column and is_null on a real column behave as intended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SeaTable answers with an empty list for an ID that doesn't exist, and for a row whose activities are past its retention period. A model could read either as "never changed". An empty result now looks up the row: a wrong ID is an error, and an existing row gets a notice. The notice names no period, as the retention period varies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Models often send values as text, and find_rows compared them strictly or as text. On a real base, Betrag > "10" returned 11 rows instead of 7, including one of 9.49, and != matched every row. A number cell now reads a plain number in text as a number, a text cell matches a number with the same text, and a checkbox matches the words true and false. "55,99" stays no number, as it could mean several things. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Betrag < 10 also returned the rows without a Betrag, as an empty cell counted as smaller than everything. On a real base, find_rows returned four rows more than the same query_sql. gt, gte, lt and lte now match no empty cell, like SQL. Sorting by order_by and finding empty cells with is_null stay as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Filters of the wrong shape either cost a round or matched nothing without a word, such as an operator object under a column. normalizeWhere now reads the forms models send as long as the meaning is clear: operators under a column, column or the column name instead of field, aliases, several operators next to each other, a list as a value. The case of a column is corrected if only one fits, with a notice. A typo, an unknown operator or a missing field stays an error, as a repair would be a guess. delete_rows reported the number of IDs it was given, also for IDs that matched no row. It now reports SeaTable's count and no success if an ID matched nothing. unlink_rows no longer reports success if no link was removed. The row ID note also covers the other wordings SeaTable uses per endpoint. Checked against a real base, including the write tools with wrong IDs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The API returns dates with a time, such as 2026-08-05T00:00:00+02:00. As text, that never equals 2026-08-05 and is greater than it, so = found nothing and <= and > were off by a day. A plain date now compares with the day of the cell. A date in another format compared as text too: >= "01.08.2026" returned every row with a date. On date columns this is now an error naming YYYY-MM-DD, as the meaning of such a date depends on the locale. Checked against a real base: all comparisons on three date columns return the same as the query in SQL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Several tools answered as if all was well when a request couldn't be applied. "0 rows" or "success" reads like a fact, so a model passed it on or went searching elsewhere. In the case that started this, a model passed
whereas a JSON string, got 0 rows, and then read other tables: 8 tool calls for one question.The rule now: what the server can read clearly, it repairs. What would be a guess, it reports.
find_rowsfilters{Name: {eq: "x"}},{Betrag: {gt: 1, lt: 9}},{eq: {column: "Name", value: "x"}},{eq: {Name: "x"}},{eq: ["Name", "x"]}, aliases such as=,EQ,not_inandis_not_null, several operators next to each other, a list as a value.notice.find_rowscomparisons (all gave wrong results before, not just missing ones)Betrag > "10"compared as text and also returned 9.49. Plain numbers in text now compare as numbers, andneno longer matches every row.Betrag < 10also returned rows without a value. Empty cells now match no ordering, like SQL.= "2026-08-05"found nothing and<=and>were off by a day. A plain date now compares with the day of the cell.>= "01.08.2026"returned every row with a date. On date columns this is now an error namingYYYY-MM-DD, as the meaning depends on the locale.Row IDs
delete_rowsreported the number of IDs it was given, also if nothing was deleted. It now reports SeaTable'sdeleted_rows, and no success if an ID matched nothing.unlink_rowsno longer reports success if no link was removed.get_row_activitiesanswered the same for a wrong ID and for a row past the retention period. It now looks up the row on an empty result: a wrong ID is an error, an existing row gets a notice that names no period, as the retention period varies._idand how to find it, and the server adds this to SeaTable's errors for an unknown row.Behaviour changes
find_rowsreturns errors for filters that used to return 0 rows, and different rows for the comparisons above.delete_rowsandunlink_rowscan returnsuccess: false.get_row_activitiesmakes one more call on an empty result.docker-compose.yml.Test plan
tests/rowLookup.spec.tswritten first and seen failingquery_sqldocs/testing-with-models.mdwith a real model: not run yet. It needs a deployed image, for example from atesting-v1.9.5tag. Whether the number of tool calls really drops is not shown yetdeleted_rows,delete_rowsreports the number of IDs as beforeKnown limitations
upload_filewas called once with a wrong ID on the test base. It returned an error, but whether a file stayed behind in the asset storage wasn't checked.2026-08-05T23:00, still compares as text, so a different time zone offset can shift it.search_rows,upsert_rowsandadd_rowwere not changed.row_ids, still end in a format error. They aren't silent, and repairing them centrally would be a separate PR.🤖 Generated with Claude Code