Repository navigation
feat(altimate-code): experimental direct MCP data tools (Claude reasons, altimate-code supplies tools) - #6
Draft
anandgupta42 wants to merge 14 commits into
Draft
anandgupta42 wants to merge 14 commits into
anandgupta42 wants to merge 14 commits into
Conversation
…mode routing - `.mcp.json` starts `altimate-code mcp serve`, so Claude Code calls altimate-code's read-only data tools (warehouse_list, schema_inspect, sql_execute, sql_check, sql_materialize) directly; Claude's own model does the reasoning and no second LLM runs. - New lean `data-question` skill: inspect value profiles before choosing columns or keys, compute in the database, materialize the small side for cross-database joins, check keys/fan-out when they matter. - The `altimate-code` routing skill now answers data questions with the tools and keeps `altimate-code run` delegation for long multi-step jobs; the SessionStart hook and `/altimate` text match. - Version 1.1.0-experimental; README and CHANGELOG note it needs an altimate-code build with `mcp serve` and describe the read-only limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… triggers - Data questions prefer the altimate-code MCP tools and fall back to `altimate-code run` (analyst) when the server is missing or fails to start, telling the user which path was used. - Restore delegation triggers for lineage, impact, schema diff, parity, PII, cost attribution, optimization, SCD2/incremental checks, docs and diffs. - PRIVACY.md describes the local MCP server and that tool results reach the model provider; `sql_check` engines and materialize-first noted. - Delegation here-docs use a per-call delimiter checked against the task text. - CONTRIBUTING.md covers `.mcp.json` and the `data-question` skill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… skill triggers - SessionStart output now carries compact routing (MCP tools for data questions, analyst/fast-edit/builder delegation otherwise). - Skill descriptions trigger on ordinary data questions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The MCP server's default toolset is now `warehouse_list`, `warehouse_add`, `sql_execute` (with `tables` for schemas and value profiles), `sql_materialize` and `answer_commit`; `schema_inspect` and `sql_check` need `mcp serve --all-tools`. The analyst agent, skills, READMEs and changelog no longer tell the model to call the hidden tools, and a missing connection is added with `warehouse_add`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 7 tasks
…instructions carry its method The skill duplicated the analyst agent and the MCP server instructions, and its listing was sent with every request (no session loaded it). The routing skill, /altimate and README now point at the server instructions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Skill descriptions are listed in every request; the bodies load only on use. review 1,278 -> 268 chars, altimate-code 440 -> 214 chars. Bodies unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent prompt is re-read on every request. Keep: warehouse_add for a missing connection, value check via `tables`, every condition must filter, two readings into `readings`, policy conditions against the row, and the answer_commit finish (one field per requested item, entity and related item separate, FINAL ANSWER reply, recommit on rejection). Method steps already in the server instructions are no longer repeated. Body 3,798 -> 988 chars. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hook runs once per session, but its text stays in the context and is re-read on every request. One sentence (537 -> 215 chars) keeps the routing: MCP tools for data questions, `altimate-code run` delegation otherwise, /review for dbt/SQL PRs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…call
The MCP server now lets a later batch step use an earlier step's rows (`{{label.column}}`, `{{label}}`); one line in the agent points at it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server now expands `{{label.column}}` to bare comma-separated values, so the example reads `IN ({{label.column}})`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ional The analyst now ends with one `FINAL ANSWER:` line giving every requested item in order (an entity and its related item both), which saves the commit round trip. `answer_commit` stays available. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…artup The MCP server now lists connections (and small local catalogs) in its instructions, so the analyst starts without a `warehouse_list` call; `warehouse_list` refreshes them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Experimental — draft, not for merge. It needs an altimate-code build with
altimate-code mcp serve(AltimateAI/altimate-code#1543, also a draft experiment).Why
Today this plugin hands each data task to
altimate-code run. A second model does the work, and Claude Code's own reasoning loop is bypassed. This change lets Claude Code use altimate-code's data tools directly instead. Claude's model does the reasoning, so the user's Claude Code plan covers the LLM cost. altimate-code supplies read-only tools and runs no model.What changed
MCP server.
plugins/altimate-code/.mcp.jsonstartsaltimate-code mcp serve. That gives Claude Code five tools:warehouse_listschema_inspect, with a value profilesql_execute, read-only by defaultsql_checksql_materialize, which copies data into a session-local scratch DuckDB for joins across databasesSkills.
data-questionskill (24 lines, generic). Inspect value profiles before choosing columns or join keys, compute in the database, materialize the small side for joins across connections, and check keys and fan-out when they affect the answer.altimate-coderouting skill now answers data questions with the tools. It keepsaltimate-code rundelegation for long multi-step jobs such as dbt builds and migrations. The SessionStart hook and/altimatecommand text match.Version and docs.
1.1.0-experimental.How tested
bash -nand ShellCheck on the hook script, the plugin validators, andgit diff --check.--plugin-dir.altimate-codeon PATH was a branch build of #1543. Bash and web tools were disabled. The data was a 60-row SQLiteorderstable, found through project connection discovery (.altimate-code/connections.json).1.1.0-experimental, and thedata-questionskill was available.plugin:altimate-code:altimate-codeconnected.warehouse_listandsql_execute, and the answer was correct: cust4 and cust2 tie with 5 paid orders, and the paid orders total 12,555. The cost was $0.07.schema_inspectwith only a warehouse, to list its tables, and the tool rejected the call becausetableis required. A table-list mode forschema_inspectis a follow-up on the altimate-code side.Update: analyst agent and
answer_commitagents/analyst.md: the analyst method as a plugin agent. Start withclaude --agent altimate-code:analyst(or set it as theagentsetting) to make it the main agent. It finishes with the MCPanswer_committool and replies with the returnedFINAL ANSWER:text.data-questionskill's last step now usesanswer_commit.altimate-code mcp serveexposes data tools to MCP clients without an LLM altimate-code#1543 (sixth toolanswer_commit).answer_commit58/90. All 90 trials ended with an accepted commit (14 rejected commits). Gain is limited to questions where the agent changed answers; it is not a clear win overall.🤖 Generated with Claude Code
Update 2026-10-21 (head e378906)
Shrinks the text the plugin adds to every request, one commit per piece:
warehouse_list,warehouse_add,sql_executewithtables,sql_materialize,answer_commit).data-questionskill (duplicate of the analyst agent and the server instructions; never loaded).Local Codex review at e378906: no P0/P1. Open follow-ups: restore the
dbt_project.ymlqualifier in the review skill description (P2) and repointCONTRIBUTING.mdfrom the removed skill (P3).Internal eval (5 trials per question, 12 questions): accuracy held with these cuts; first request ~4.5k tokens smaller, most of it from running without the
Skilltool.Update 2026-10-21 (head 8e3ae4e)
sql_executecall withIN ({{label.column}})(server support in feat(mcp):altimate-code mcp serveexposes data tools to MCP clients without an LLM altimate-code#1543). Local Codex review: no findings.Update 2026-10-21 (head bce15b1)
FINAL ANSWER:line giving every requested item in order (an entity and its related item both);answer_commitis optional.warehouse_listrefreshes it.Update 2026-10-21: own task set on a real warehouse (head bce15b1, no change)
warehouse_addin 4 of 9 runs and used Bash clients in the other 5 (all passed).