Agent Tools
ADX exposes nine read-only, deterministic tools designed for AI agent consumption. Every tool returns structured JSON with citations.
Design Principles
- Read-only: No tool modifies the document. Agents explore safely.
- Deterministic: Same input, same output. No randomness.
- Structured: JSON responses, not free text. Agents parse, not guess.
- Citeable: Every result traces back to a page, cell, or bounding box.
- Composable: Tools suggest next steps.
profilerecommends tools for the document type.
Tool Reference
profile_document
Returns file metadata, detected document type, and recommended next tools.
profile = dn.profile(doc_id)Returns:
file_name,file_type,file_sizepage_countorsheet_countdocument_type— auto-detected:invoice,contract,financial_model,report,generalhas_tables,table_countconfidence— overall parsing confidencerecommended_tools— what to call next based on document type
list_structure
Returns the document outline: headings, sections, and table locations.
structure = dn.structure(doc_id)Returns:
sections[]— title, start/end page, depthtables[]— id, page, row/column counts, header rowpage_count
search_document
Full-text search across the document. Returns matches with page/cell location and context.
results = dn.search(doc_id, query="payment terms")Parameters:
query— search stringmax_results— limit (default: 20)
Returns:
matches[]— page, snippet, location (bounding box or cell reference)
get_page
Retrieve all text blocks and tables on a specific page.
page = dn.get_page(doc_id, page_number=2)Returns:
text_blocks[]— text, type (heading/paragraph/header/footer), bounding boxtables[]— table summaries on this page
get_table
Retrieve a specific table's contents as structured rows.
table = dn.get_table(doc_id, table_id="table_0")Returns:
headers[]— column headersrows[][]— cell valuesmarkdown— pre-rendered markdown tablecitation— page, bounding box
list_sheets
List all sheets in a spreadsheet with metadata.
sheets = dn.list_sheets(doc_id)Returns:
sheets[]— name, index, row/column counts, hidden status, named ranges
read_range
Read a cell range from a spreadsheet.
data = dn.read_range(doc_id, sheet="Summary", range="A1:D10")Parameters:
sheet— sheet namerange— cell range (e.g.,A1:D10)include_formulas— include formula text (default: true)
Returns:
cells[]— address, value, formula, type, hidden status
find_cells
Search for cells matching a value or pattern.
cells = dn.find_cells(doc_id, query="Revenue", sheet="Summary")Parameters:
query— search stringsheet— optional sheet filter
Returns:
matches[]— address, value, sheet, formula
inspect_formula
Trace a formula's dependencies and precedents.
info = dn.inspect_formula(doc_id, sheet="Summary", cell="B10")Returns:
formula— the formula textcomputed_value— calculated resultreferences— cells and ranges referencedcross_sheet_refs— references to other sheetsexternal_refs— references to external workbooks
Tool Chaining
Tools are designed to compose naturally. A typical agent workflow:
profile_document— understand what you're working withlist_structure— find tables and sectionsget_tableorread_range— drill into specific datasearch_document— find specific valuesextract— pull structured fields with a schemavalidate— verify extraction correctness
The recommended_tools field in profile_document guides this flow automatically.