table_cite
Manage table cell citations by adding, retrieving, or removing source references such as PDF sections or URLs, without altering the table data.
Instructions
📎 表格引用管理:為儲存格附加、查詢、移除來源引用。
引用是「平行附加層」,不改變表格資料結構。 每個引用用 AssetRef 指向具體來源(PDF section、URL、使用者輸入等)。
Operations:
add: 新增引用到儲存格
get: 查詢引用(cell / row / table)
remove: 移除引用
cell_history: 查看儲存格變更歷史
Args: operation: 操作類型 table_id: 表格 ID row_index: 列索引 (0-based),get 時可省略取得全表引用 column_name: 欄位名,get 時可省略取得整列引用 refs: [add] 引用列表,每項為 AssetRef dict [{"source_type":"section","doc_id":"doc_xxx","asset_id":"sec_01","excerpt":"..."}] [{"source_type":"external","url":"https://doi.org/...","label":"Smith 2024"}] [{"source_type":"user_input","excerpt":"Patient reported"}] confidence: [add] Agent 信心度 0.0~1.0 notes: [add] 備註 ref_index: [remove] 移除特定引用索引(不指定則移除整個 cell 引用)
Examples: table_cite("add", "tbl_xxx", row_index=0, column_name="Drug", refs=[{"source_type":"section","doc_id":"doc_a","asset_id":"sec_01", "excerpt":"dose was 5mg"}], confidence=0.9) table_cite("get", "tbl_xxx") # 全表引用 table_cite("get", "tbl_xxx", row_index=0) # 全列引用 table_cite("cell_history", "tbl_xxx", row_index=0, column_name="Drug")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| table_id | Yes | ||
| row_index | No | ||
| row_id | No | ||
| offset | No | ||
| limit | No | ||
| column_name | No | ||
| refs | No | ||
| confidence | No | ||
| notes | No | ||
| ref_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |