Part 1 of 2 ยท knav read
Letting AI agents be a trusted Knack development partner
I turned the Knack builder UI built for clicking and typing into a fully agent-drivable system, complete with features far beyond what the native UI and Knack's builder MCP offered. This was done carefully over a period of several months, with some painful lessons along the way. Built solo with AI agents, the system now runs as a 31-tool read MCP and a 58-tool write MCP, backed by 292 resolved schema-reading gaps, so Knack apps can be almost fully developed using an agent.
The problems
- Navigating the Knack builder UI became a bottleneck compared to agent-driven development.
- Large and complex Knack apps were difficult to manage.
- Understanding the true impact of changes required painstaking documentation of how things in the app relied on each other.
What I built
- Knavigator web app. A free developer tool that converts an entire app's schema into an easy-to-understand UI.
- knav read CLI/MCP. Lets an AI agent parse and understand an entire Knack app's schema.
- knav write CLI/MCP. Lets an AI agent read and write to an entire Knack app, both schema and records (covered in Part 2).
Why the app JSON is hard to read
During the development process of these tools I found out slowly and painfully that a Knack app schema is a very complicated and difficult-to-understand JSON file. I used AI to help me parse and understand the JSON, but, even AI had difficulty getting it right. The way that Knack constructs the JSON file is not intuitive at first. There are leftover values in the file that are no longer used, based on what was selected manually in the builder UI.
For example, in a form, you can have a rule that says "When this form is submitted, check if the remaining balance of this record is greater than 0. If yes, then send an email". In the Knack UI, you choose who the email goes to: a field on the record (for example, the customer's email) or an address you type in. If you start with the field and later switch to a typed address, the builder hides the field, as expected. However, the JSON keeps both. The old field and the new address sit side by side in the same recipient, and one small setting that's not immediately clear says which one Knack uses.
An agent reading that JSON sees a field in the recipient and concludes the email depends on it. The answer is wrong, and it looks right. Now that field shows as "in use", and any impact check built on it is off. This can have unintended consequences when deciding to delete a field that you "think" is no longer in use. The schema of a large app is 2.5 to 7+ MB, and it carries many cases like this. Each one is small. Together, they meant I could not trust an agent to read the raw file with full accuracy.
At the beginning, I often had to manually go into the Knack builder and show the agent that something was not right in its parsing of the app JSON. Eventually I asked the agent to click through a Knack table in the browser: click into every column, read every rule, capture the screen, and confirm how the app JSON maps all of those settings. The JSON is the source of truth, and the builder UI was the way to verify that the parsing of it was right.
Finding the wrong readings in real use
That changed how I built knav. I stopped expecting to get every reading right up front, and built a loop that finds the wrong readings in real use.
- Log every fallback. knav MCP is the default way my agents read an app. When the MCP cannot answer and the agent has to read the raw JSON instead, the agent must say so and log a gap using a skill: what it asked, what knav returned, what it should have returned, and a command that reproduces it.
- Reproduce before fixing. In addition to the skill to log gaps, I created a skill to fix gaps. The skill instructs the agent to work through the backlog using a structured series of steps. Each fix starts by re-running the logged command against a fresh JSON copy of the same app. If knav already answers correctly, the entry is closed as stale. An entry records one observation and a guess at its cause, made mid-task. The guess is sometimes wrong, so the agent must prove the fix first.
- Prove it on the real app. Each fix ships with a test and a check on the app where the gap was found. What's in the JSON must match what the MCP returns and what the Knavigator web app shows on screen. The full test suite must pass before the fix merges.
- Make it permanent. The test stays, so the same misreading cannot come back.
A 100-question test
In addition to logging gaps during day-to-day work, I ran a 10-agent pass on a real 90-table client app to build a 100-question test suite across four difficulty tiers:
- Tier 1 (30 questions): Single-item lookups (for example, what type a field is, which table it belongs to, and how many times it is used).
- Tier 2 (30 questions): Multi-step lookups across rules, connections, editable views, and emails.
- Tier 3 (22 questions): Cross-table impact questions ("If I change this field, what breaks downstream?").
- Tier 4 (18 questions): Boundary and "gap hunter" questions designed to find settings buried in the raw JSON that knav did not surface yet, plus 7 questions that are impossible to answer from the schema alone (like live record counts) to verify that the agent states the limit instead of guessing.
One agent answered all 100 questions using only knav, and a separate grader agent checked every answer against the raw JSON. On the first run, 74 passed and 17 failed due to missing tool capabilities. After feeding those misses through the gap loop, passing answers rose to 90 and capability failures dropped to 0 (with 3 partial and the 7 impossible questions handled as expected).
Results
- 302 capability gaps logged and 292 resolved. Since late June 2026, every fallback to raw JSON has been logged and fixed through this loop (with 9 closed as already fixed or out of scope, and 1 open). The read engine is now backed by 266 test files and 147 golden-output checks that force the CLI, MCP, and Knavigator web app to return identical answers.
- 31 MCP tools live in production and used across client work. knav read runs as a hosted MCP server with OAuth 2.1 and credit billing. In my own client work, agent teams used it to make ~3,350 calls across a 50-table, 832-field production app during a three-day system audit (with 100 of 102 counts confirmed exact on an independent recount), and to scan the custom JavaScript of 13 live apps ahead of a breaking Knack API change, catching the 2 breaking calls before the deadline.
What I learned
- Building a structured workflow with skills where agents log and fix their own tool gaps during real work saves time and mental energy, and compounds the quality of the tool over time.
- When designing a bug-fix workflow, instruct the agent to reproduce the issue before starting, and prove the fix against the real app before marking it complete.