# Build Tools Reference The Chipp MCP tools a coding agent uses to publish and run an app built on the Chipp app template. --- {/* Generated by scripts/docs/generate-build-tools-reference.ts from the tool registries. Do not edit by hand. */} These are the tools of the Chipp MCP server that a coding agent outside Chipp (Claude Code, Codex, Cursor, Hermes) uses to publish an app built on the [Chipp app template](https://github.com/chipp-ai/alchemist-template) and to run it in production. Connect the server at `https://mcp.chipp.ai/mcp/build`. Every tool except the ones that create or find a project takes the `project_id`, and every tool sees only your own projects. Before each push, run `deno task conformance` in the repo. A change that replaces part of the template stack (another web framework, ORM, logger, error tracker or analytics SDK) stops the build, and smaller drift comes back as warnings in the publish result. ## Start and sign in Create the project and get git access. The first call opens a browser tab to sign in with an email code. ### `get_me` Get the current authenticated identity: user email, all accessible organizations, tier, and scopes. Also reports which organization this session's organization-scoped tools bind to (effective_organization), and whether Alchemist Cloud (Factory projects, ticketing) is available with a remedy when it is not. Call this FIRST when an expected organization, workspace, app, or Factory project is missing from a listing. No parameters. ### `start_project` Start a new app on Chipp from your AI tool: creates a software factory project from the Chipp app template in your organization (deploys on every push to its default branch), and returns its project_id, live URL and two git commands that clone it. Run the commands yourself and never print the credential. The template is the stack: read AGENTS.md and CLAUDE.md in the clone before writing code. Free plan: up to 3 live projects. To work on an existing project, call get_git_access instead. | Parameter | Type | Required | Description | |---|---|---|---| | `name` | string | Yes | Short app name (1-60 chars). | | `description` | string | No | Optional: what the app does, one or two sentences. | ### `get_git_access` Fresh git access to one of your Chipp projects: a short-lived personal credential and the two git commands (store it, clone). Use it when a push or pull fails with an authentication error, or on a second machine. In an existing clone, run only the first command. Never print the credential. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | From .chipp/project.json in the clone. | ### `list_projects` List your projects with their deploy status and public URL. Excludes archived projects. Pass `query` with a spoken name ("Valor Victoria", "the VV one") to find a project by name: matching is fuzzy over the project and its organization name, best match first. A signed-in user also sees projects of their own organization and projects shared with them (the same projects the dashboard opens), each with `tenantName`, `lastActivityAt`, their newest live Builder sandbox (`latestSandbox`) and `needsYouCount` (open questions, permissions, approvals, ticket proposals and paused tickets' asks;... | Parameter | Type | Required | Description | |---|---|---|---| | `query` | string | No | Optional: the project name as the person said it. | | `limit` | number | No | Optional: max rows (default 50). | ## Publish Every `git push` to `staging` deploys the app. `publish` waits for that deploy and returns the live URL. ### `publish` Ship the pushed head of the project's default branch to its live URL and wait for the deploy. Call it after git push. A project started from your AI tool already deploys on every push; publish waits for that deploy (or starts one when the push did not), releases held work on a project with a release gate, and returns the live URL. If it returns status deploying, call it again. On failed, read get_project_logs and get_project_errors. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | From .chipp/project.json in the clone. | | `wait` | boolean | No | Wait for the deploy to finish (default true). | ### `trigger_deploy` "Deploy now": releases the work held behind the project's deploy gate to production (on the platform project, promotes the newest verified release). Every release needs a person's approval, so it runs only when a person is behind the call: (1) a session on the person's OWN MCP credential (their OAuth connector or an API key they minted, for example a Claude Code session they drive; they are the approver and the audit records them "via MCP"), including the Chipp MCP relayed from their own AI tool with their own sign-in, or (2) the agent in a person's Builder draft, which the person approves... | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | ### `watch_deploy` Watch a deploy settle and return a REGRESSION VERDICT plus the exact rollback target. Polls the deploy's status, then compares the error rate after it against the equal-length span before it. This is the single most valuable thing to do after shipping: humans skip it because it is fifteen boring minutes, which is why regressions sit in production until a customer reports them. ALWAYS call this after promoting or triggering a deploy. It NEVER acts on its own -- if the verdict is `regressed`, YOU call rollback_project_deploy with the returned rollbackTargetDeployId (rollback is ungated... | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `deploy_id` | string | No | The deploy to watch. Defaults to the project's newest deploy. | | `watch_seconds` | number | No | How long to watch after the deploy settles (10-240, default 90). | ### `get_project_release_status` Read a project's rollback-relevant deploy state: whether the project is PINNED (a pin freezes forward motion -- set automatically by a rollback, cleared by `clear_release_pin`), which recent deploys are RECALLED (marked known-bad and never valid rollback targets), the newest completed deploy actually running, and the project's release-event ledger. This is the tool that tells you which deploy id to hand to `rollback_project_deploy`. Use `list_deploys` for the broader deploy history. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `limit` | number | No | Deploys to consider (1-50, default 20). | ### `rollback_project_deploy` Roll a project back to a previously completed deploy by re-applying its built image, and PIN the project so nothing rolls forward past it until cleared. UNGATED -- this is the recovery action (see the rollback asymmetry in this module's header). The target must be a completed, image-bearing, non-recalled deploy of THIS project; call `get_project_release_status` for valid candidates. Refused when the target image is already what is running. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `deploy_id` | string | Yes | | | `reason` | string | Yes | Why. Recorded in the release ledger. | ### `clear_release_pin` Remove a project's release pin so normal forward deploys resume. A pin is set automatically by `rollback_project_deploy` to stop the bad change from rolling straight back out. `release_gated: true` also releases the work held behind the deploy gate, which ships to production: like `trigger_deploy` it runs only on a person's own MCP credential, with editor access and direct publish rights, and is refused for every other caller. From a Builder draft, clear the pin without it, then call `trigger_deploy`. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `release_gated` | boolean | No | Also release the held work (ships to production). Needs a person behind the call (their own MCP credential or their Builder draft). | ## Secrets and environment Secret values go through a secure form, never through the chat. ### `request_secrets` Ask the person for secrets this project needs (API keys, passwords, tokens, connection strings, private keys). The Builder shows a secure form for them right in the chat. Values are encrypted, never shown to you, and reach the deployed app as environment variables (on the next publish/deploy). Call this whenever code needs a secret: NEVER ask the person to paste a secret into the chat, never put one in a file, and do not send them to a dashboard. Pass only the NAMES. After calling, tell the person to fill in the form shown below your message; do not paste the link. envVarName must be... | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | No | The project, when no project is bound to this session (e.g. from .chipp/project.json). | | `credentials` | object[] | Yes | | ### `get_secret_status` Whether THIS project's secrets are set: set, not_set, or refused (saved but refused; ask again). Never returns a value. Call it before you tell the person anything about a secret or a secure form you sent, instead of saying you cannot see it. Pass names, or none for every secret the project asked for. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | No | The project, when no project is bound to this session (e.g. from .chipp/project.json). | | `names` | string[] | No | Env var names, e.g. ["OWNER_EMAIL"]. Omit for all. | ### `get_env_status` Check whether the project's PRODUCTION deployment is missing any REQUIRED environment variables. Reads the deployment's startup env-validation error logs (the app re-checks required vars on every pod startup and logs one error per missing var), so it reflects the real running deployment -- use this to verify or refute a 'Production Env Var Missing' alert. Returns presence status ONLY, never values. An empty missingVars list with unavailable=false and logSource != 'unconfigured' means every required var was set at every pod startup in the window; treat unavailable=true or... | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `window` | `"5m"` or `"15m"` or `"30m"` or `"1h"` or `"3h"` or `"6h"` or `"12h"` or `"24h"` or `"7d"` | No | Lookback window. Default '24h' (spans many pod startups). | ## Errors, logs and analytics Read only this project's production logs and Insights. ### `get_project_errors` Errors grouped by fingerprint, up to 30d (default 24h). mode groups: count, first/last seen, per-version counts, trend, sample stack, recent deploys; `release` (short sha) marks startedWithRelease. mode group + fingerprint: raw lines, users/sessions/requests hit. mode lines: raw lines. Check coverage. | Parameter | Type | Required | Description | |---|---|---|---| | `since` | string | No | 15m, 6h, 7d, max 30d. | | `start` | string | No | ISO; overrides since. | | `end` | string | No | | | `level` | string or string[] | No | error\|warn\|info\|debug or a list. Set it: error+warn are <1% of bytes. | | `contains` | string or string[] | No | Substring(s), all must match; fastest. | | `regex` | string | No | RE2 (slow). | | `message` | string | No | RE2 over msg/message. | | `fields` | object | No | Exact values for: source, feature, route, method, requestId, sessionId, applicationId, userId, consumerId, organizationId, projectId, ticketId, version, pod, status, routePattern, path, appNameId. | | `cursor` | string | No | nextCursor from the last call. | | `mode` | `"groups"` or `"group"` or `"lines"` | No | | | `fingerprint` | string | No | | | `release` | string | No | | | `include_warnings` | boolean | No | | | `top` | number | No | | | `limit` | number | No | | ### `get_project_logs` Search production logs over any range. If coverage.complete is false, coverage.summary names unsearched spans: never report 'no matches' there. Narrow by time, level, then fields or contains. mode lines (default, newest first; around = near a time; select = fields to keep), counts (group_by), trace (request_id), session (session_id). | Parameter | Type | Required | Description | |---|---|---|---| | `since` | string | No | 15m, 6h, 7d, max 30d. | | `start` | string | No | ISO; overrides since. | | `end` | string | No | | | `level` | string or string[] | No | error\|warn\|info\|debug or a list. Set it: error+warn are <1% of bytes. | | `contains` | string or string[] | No | Substring(s), all must match; fastest. | | `regex` | string | No | RE2 (slow). | | `message` | string | No | RE2 over msg/message. | | `fields` | object | No | Exact values for: source, feature, route, method, requestId, sessionId, applicationId, userId, consumerId, organizationId, projectId, ticketId, version, pod, status, routePattern, path, appNameId. | | `cursor` | string | No | nextCursor from the last call. | | `mode` | `"lines"` or `"counts"` or `"trace"` or `"session"` | No | | | `request_id` | string | No | | | `session_id` | string | No | | | `order` | `"newest"` or `"oldest"` | No | | | `around` | string | No | ISO time: lines either side of it. | | `around_seconds` | number | No | | | `min_duration_ms` | number | No | | | `min_status` | number | No | | | `group_by` | string[] | No | | | `select` | string[] | No | | | `limit` | number | No | | ### `get_project_analytics` Read aggregate Chipp Insights end-user analytics for the project: event volume by type (pageview/identify/error), unique visitor + identified-user counts, top pages, top countries, and top client-side errors, over a lookback window. Also returns visitsBySource: visits split by traffic source (search = SEO and AI assistants, social, referral, direct, ads), the top referring sites, and trackingSince (sources are only known from that date; 1h and 6h windows report the last 24h for this part). Use it before writing a growth plan for one source. Distinct from get_project_errors/get_project_logs... | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `window` | `"1h"` or `"6h"` or `"24h"` or `"7d"` or `"30d"` or `"90d"` | No | Lookback window. Default '7d'. | ## Customer support Look up one of the app's users and see what they did. ### `find_customer` Customer support lookup in YOUR app's production database: find one end customer by email, user id or organization name. Returns up to 10 matches with account, organization and plan, role, sign-up and last sign-in times, recent purchases, and the get_user_journey arguments to call next. Read-only and audited. Payment ids are masked unless show_sensitive is true. Built for the Chipp app template's tables; if the app changed them, it says what is missing and you can use inspect_schema and query_database. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `query` | string | Yes | Email (exact or part), user id, or organization name. | | `show_sensitive` | boolean | No | Show payment ids unmasked. Default false. | ### `get_user_journey` Reconstruct ONE end user's timeline for a project: their Chipp Insights beacon events (pageviews, identify, client-side errors) merged with any server-side error log lines mentioning them, oldest first. This is the support-ticket tool -- get_project_analytics is aggregate and cannot answer "it is broken for this specific person". Look them up by the email they identified with, or by an anonymous distinct_id. Beacon identity is client-asserted and NOT verified, so treat it as a correlation key, never as proof of who someone is. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `user_ref` | string | Yes | The user's identified email, or their anonymous distinct_id. | | `window` | `"5m"` or `"15m"` or `"30m"` or `"1h"` or `"3h"` or `"6h"` or `"12h"` or `"24h"` or `"7d"` | No | Lookback window. Default '24h'. | | `limit` | number | No | Max events (1-500, default 200). | ## Production database SQL on this project's own database. Reads are read-only; `write_database` changes rows with a dry run first and an audit row for every call. Schema changes ship as a migration in `db/migrations/`. ### `inspect_schema` Read the project's database schema (tables/columns/types). Masked columns (passwords, secrets) are stripped: they are NOT visible to this tool. ALWAYS call this BEFORE writing any SQL with query_database, so you know what tables and columns actually exist. A project may expose more than one named connection (the default app DB plus, for some projects, a 'legacy' connection to an external source-of-record database): pass `connection` to inspect a non-default one. The schema output lists every available connection at the top. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `connection` | string | No | Named DB connection to inspect. Defaults to 'default' (the app DB). Use the connection name shown in the discovery header (e.g. 'legacy'). | ### `query_database` Run a read-only SQL query against the project's database. Returns { columns, rows, rowCount, truncated, note? }. EXACTLY ONE SQL statement per call: do not separate multiple statements with semicolons; if you need to run several queries, call this tool once per statement (a multi-statement `sql` argument is always rejected with FORBIDDEN_SQL). Writes and DDL are blocked at multiple layers: the connection runs under SET default_transaction_read_only=on, and blocked-statement patterns (DROP DATABASE, DROP TABLE, TRUNCATE, ALTER TABLE) are rejected up front. Results are capped at the... | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `sql` | string | Yes | SELECT/CTE only, a single statement (no semicolon-separated statements, call this tool once per statement instead). Read-only is enforced at the connection level; an attempt to write fails with a database error. | | `connection` | string | No | Named DB connection to query. Defaults to 'default' (the app DB). Use a name from inspect_schema's discovery header (e.g. 'legacy'). | ### `write_database` Change data in YOUR app's production database for customer support (for example fix one customer's plan or email): ONE INSERT, UPDATE or DELETE statement. UPDATE and DELETE run as a dry run by default: it reports how many rows would change and writes nothing; call again with dry_run false to apply. More than 25 rows needs confirm_rows set to the dry run's count. Schema changes (CREATE, ALTER, DROP) are refused: ship them as a migration. Every call is audited (who, when, the statement, rows affected) and a write returns an undo id. Say what you will change before you apply it. | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | | | `sql` | string | Yes | Exactly one INSERT, UPDATE or DELETE. | | `dry_run` | boolean | No | Count rows and roll back. Default true for UPDATE and DELETE. | | `confirm_rows` | number | No | Only above 25 rows: the row count from the dry run, after the person agreed. | ## Custom domain Put the app on your own domain. ### `request_domain_connection` Put a custom domain on THIS project. In the Builder it shows a card in the chat. With `hostname` (app.example.com, or a root such as example.com, which goes live at www): one click adds the domain, signs the person in to their DNS provider and adds the records, with the records to add by hand as the fallback. With intent "buy": the person finds and buys a new domain, and it is connected. Creates nothing until the person clicks. Use it when the person asks for a domain, and offer it when they publish. Never list DNS records in chat instead. If the domain is live already, no card goes out... | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | No | The project, when no project is bound to this session (e.g. from .chipp/project.json). | | `hostname` | string | No | The domain the person owns, e.g. "app.acme.com" or "acme.com". | | `intent` | `"connect"` or `"buy"` | No | "buy" to find and buy a new domain (no hostname). Default: connect the hostname. | ### `get_project_domain_status` THIS project's web addresses: its Chipp address and every connected custom domain, with DNS and SSL state (live, waiting, attention), the plain status message, and the DNS records still missing. Call it before you say anything about a domain, and after the person finishes a domain card. Pass refresh: true to re-check DNS and SSL now (slower). | Parameter | Type | Required | Description | |---|---|---|---| | `project_id` | string | No | The project, when no project is bound to this session (e.g. from .chipp/project.json). | | `refresh` | boolean | No | Re-check DNS and SSL for domains that are not live yet. Omit for the stored status. | ## Docs Chipp docs and the template's own guides. ### `search_docs` Search the Chipp platform documentation for guides, API reference, and tutorials. | Parameter | Type | Required | Description | |---|---|---|---| | `query` | string | Yes | Natural language search query describing what you want to know | | `limit` | number | No | Number of results to return (default 5, max 10) |