Tools provided
Tools the agent exposes — your AI client calls them automatically when it needs them.
- run_full — Orchestrated path: audit the provided migration for lock and downtime risk, scan the slow-query log for N+1 patterns and missing indexes, build the EXPLAIN comparison, and return the full report plus a ready-to-paste PR description.
- analyze — Run pure deterministic analysis over provided migration operations, slow queries and the existing index catalogue with no model call, returning scored findings.
- parse_migration — Parse a provided migration DDL string into classified operations — ADD COLUMN, CREATE INDEX and the rest — the parsing step on its own.
- analyze_migration_risk — Classify each migration operation's lock and downtime risk with engine-aware rules for Postgres and MySQL, and propose a safe rewrite for every risky step.
- detect_n_plus_one — Scan the slow-query log for N+1 patterns — the same template run many times at low per-call latency. Entries missing their call or latency counters are excluded and reported rather than scored on a guess.
- suggest_indexes — Suggest indexes for WHERE columns not covered by your existing catalogue. A suggestion built from an entry with incomplete counters is flagged as unranked rather than given an invented impact figure.
- compare_explain — Build the EXPLAIN before and after comparison from your EXPLAIN text. The before numbers are read from your output; an after cost appears only when genuinely derivable, otherwise it says to re-run EXPLAIN ANALYZE on a read replica.
- list_capabilities — List the agent's static capabilities: the available tools and the lock-risk rule table mapping each DDL operation to its risk level. Useful for discovery.
- plan_inputs — Plan the inputs for a tool: returns the clarifying questions, the JSON schema and a ready-to-edit example.
- discover_intent — Understand your goal and co-design the exact input through clarifying questions before running.
- open_form — Opens the guided form to paste the migration SQL, database engine, slow-query log and EXPLAIN output. The entry point for running the agent on your own data.
- run_form — Internal: invoked by the guided form when the user submits. Not for direct use.