Ad Sheets
AI-Powered Spreadsheet Assistant

A spreadsheet with AI tool use. The agent reads, writes, and analyzes cells through structured tools. Univer.js meets Claude.
Overview
A spreadsheet application where AI can manipulate cells through structured tools. Ask questions about data, request calculations, or have the agent populate templates.
Challenge
LLMs can reason about data but cannot touch it. Tool use bridges the gap, but tools need careful design: proper schemas, validation, error handling. I wanted a clean implementation of AI-spreadsheet interaction.
Approach
Integrated Univer.js as the spreadsheet engine. Full Excel-like functionality: formulas, formatting, ranges.
Built Zod-validated tool schemas: readCells, writeCells, findCells, getSheetInfo. The AI knows exactly what it can do.
Separated tool definition from execution. Tools are pure specifications; execution bridges to spreadsheet state.
Used AI SDK v5 with Claude for tool orchestration. Multi-step operations work: read data, calculate, write results.
Outcome
The tool use pattern works cleanly. AI can analyze data, perform calculations, and update cells - all through validated, type-safe tools. A template for any AI-external-system integration.