Skip to main content
Glama

gulliver_incremental

Read-only

Classifies a scheduled model as append, partition overwrite, merge recompute, or not safe, then generates incremental SQL and dbt config and estimates rows skipped per run without writing data.

Instructions

Incremental advisor for a model that rebuilds everything each run. Classifies it (append, partition_overwrite, merge_recompute, not_safe), generates the incremental SQL and dbt config as text, and, with a connection, measures how many rows a run would skip (one budget-checked count query). not_safe means the result would change, so keep the full rebuild. It never writes data. Use it for models that run on a schedule; use gulliver_fix for a single slow query.

Input Schema

NameRequiredDescriptionDefault
sqlYesThe model's SELECT (dbt Jinja allowed).
periodNoHow often it runs / the recompute window, e.g. '1d', '1h'.1d
lookbackNoExtra periods to recompute for late data.
connectionNoConnection name as listed by gulliver_status (from gulliver.toml or GULLIVER_DSN). Omit for the default connection.
unique_keyNoColumns that identify a row, for merge strategies. Omit for append-only models.
time_columnNoColumn that tells which rows are new, e.g. 'ts'. Omit to let Gulliver guess.

Output Schema

NameRequiredDescriptionDefault
statusYes
next_stepYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.1
    • changedInput schema / properties / connection / description
      Previous value: -"Connection name from gulliver_status. Omit for the default."New value: +"Connection name as listed by gulliver_status (from gulliver.toml or GULLIVER_DSN). Omit for the default connection."
    • changedInput schema / properties / time_column / description
      Previous value: -"Column that tells which rows are new, e.g. 'ts'."New value: +"Column that tells which rows are new, e.g. 'ts'. Omit to let Gulliver guess."
    • changedInput schema / properties / unique_key / description
      Previous value: -"Column names."New value: +"Columns that identify a row, for merge strategies. Omit for append-only models."
  2. Changed3 schema fields changedv0.1.1
    • addedOutput schema / properties
      Added value: +{
      +  "next_step": {
      +    "type": "string"
      +  },
      +  "status": {
      +    "enum": [
      +      "ok",
      +      "warn",
      +      "block",
      +      "needs_rehearsal",
      +      "needs_approval",
      +      "skipped",
      +      "fail",
      +      "error"
      +    ],
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "status",
      +  "next_step"
      +]
    • changedOutput schema / title
      Previous value: -"gulliver_incrementalDictOutput"New value: +"GulliverResult"
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnlyHint=true and destructiveHint=false, and the description reinforces with "never writes data" while adding genuinely new behavior: when a connection is supplied it issues exactly one budget-checked count query, so the agent knows there is a real (but bounded) database cost. It also explains that outputs are text artifacts rather than applied changes, and what not_safe implies. Minor gap: it does not say what happens when the connection is invalid or the count is refused by budget.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences plus a routing sentence, with purpose front-loaded. Slightly overloaded with parentheticals (the strategy list and the budget-checked query), but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema, rich annotations, and fully documented parameters, the description covers everything an agent needs: what it returns (classification, SQL/config text, optional row estimate), that it is non-mutating, and when to prefer a sibling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema carries parameter definitions; the description still adds meaning beyond it by tying the connection parameter to an actual count query and clarifying that the cost estimate is opt-in. The strategy categories and not_safe semantics also explain why a unique_key/merge path exists.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb-and-resource: it classifies a rebuild-every-run model into one of four named strategies (append, partition_overwrite, merge_recompute, not_safe), emits incremental SQL plus dbt config as text, and optionally measures skipped rows. It also explicitly contrasts itself with a sibling (gulliver_fix for a single slow query), so an agent can route without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit use condition ("models that run on a schedule") and names the alternative (gulliver_fix) for the contrasting case (a single slow query). It also clarifies what to do with each outcome, e.g. not_safe means keep the full rebuild.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.