Skip to content

Documentation

MCP server

tbase mcp serves the Model Context Protocol over stdio. Every titlebase command is a tool, so an AI agent on your machine can search, edit, undo and save a plant, and do anything the app can do.

How it works

  • One tool per command. Tools are generated from the same registry as the CLI. A new command is a new tool, with no extra code.
  • Parity is tested. A test fails the build if a command is missing from the CLI or MCP, or if either is missing an input.
  • Typed. Each tool has a JSON Schema for its input, written from the same Rust types the command uses.
  • Local. The server runs on your machine and reads the plant from disk. titlebase does not upload your plant anywhere.

Claude Code

claude mcp add titlebase -- tbase mcp

Then ask in plain words: "How many warranty deeds in SAMPLE ADDITION 5 name DOE?" The agent calls docs_search and reads the JSON.

Other MCP clients

Any client that launches stdio servers works. Most take a config like this:

{
  "mcpServers": {
    "titlebase": {
      "command": "tbase",
      "args": ["mcp"]
    }
  }
}

Use the full path to tbase if it is not on the client's PATH.

Bind to one plant

With --file, every tool defaults to that plant, so the agent does not need to pass file on each call:

claude mcp add titlebase -- tbase mcp --file ~/plants/sample-county-tx.titlebase

Tools

ToolCLIWhat it does
file_infotbase file infoShow a plant file's size, page size, row counts per table and any extra tables.
docs_gettbase docs getFetch one document by UUID or row id, with its full stored JSON.
docs_listtbase docs listList documents in row id order, or sorted by any indexed column, one summary line each, with keyset paging.
docs_searchtbase docs searchSearch documents by instrument number, type, filed dates, party, grantor, grantee, addition, lot, block, book and page, sorted by any column; all given filters must match. Uses the sidecar index when current, else scans.
ac_listtbase ac listList autocomplete values (additions, surveys, instrument and book types), optionally of one type.
lv_listtbase lv listList land validations (plat validation records by addition), optionally for one addition.
check_roundtriptbase check roundtripProve titlebase can rewrite a plant byte for byte: re-emit every row with titlebase's JSON writers, and optionally write and compare a full copy to a new file.
docs_createtbase docs createCreate a document with a new UUID, in the plant's row shape; journaled and undoable, the plant file is untouched until save.
docs_updatetbase docs updateEdit a document's fields by UUID or row id (set or remove paths); keeps the row's shape and PropertySync style, journaled and undoable.
docs_deletetbase docs deleteDelete a document by UUID or row id; journaled and undoable, the plant file is untouched until save.
ac_createtbase ac createAdd an autocomplete value of a type; refuses a duplicate of the same type and value. Journaled and undoable.
ac_updatetbase ac updateEdit an autocomplete value (type, value or any path) by UUID or row id; journaled and undoable.
ac_deletetbase ac deleteDelete an autocomplete value by UUID or row id; journaled and undoable.
lv_createtbase lv createCreate a land validation for an addition (empty platValidation unless given); journaled and undoable.
lv_updatetbase lv updateEdit a land validation (addition or any path) by UUID or row id; journaled and undoable.
lv_deletetbase lv deleteDelete a land validation by UUID or row id; journaled and undoable.
changes_listtbase changes listList rows created, updated and deleted in the edit journal (per table, with UUIDs, row ids, ops and changed paths) and recent runs.
changes_reverttbase changes revertRevert journaled changes by op, run or row back to how the row was before (undoable with changes_redo).
changes_undotbase changes undoUndo the newest run, or one op or run by id; an op can be undone only while it is the newest change to its row.
changes_redotbase changes redoRedo the run undone last, or one op or run by id; refused if the row changed since it was undone.
changes_exporttbase changes exportWrite the journal's changes to a new batch folder: batch.json (PropertySync batch, updates with top-level id), autocompletes, land validations, deletions, changes.titlebase and a manifest.
file_savetbase file saveSave: write a clean plant with every journaled edit applied (untouched rows byte-identical), verified by reopening; to --out or --in-place with a backup.
index_buildtbase index buildBuild the plant's sidecar search index at <file>.tbase/index.db (the plant itself is never changed); skips the work when the index is current unless force is set.
index_statustbase index statusShow whether the plant's sidecar search index exists and is current, with its size, document count and build time.

Read tools carry the MCP readOnlyHint. Write tools do not, and they apply directly. Inputs and outputs are listed in the CLI reference; the argument names there are the tool's input fields.

Results and errors

Results are the same JSON the CLI prints with --json. Errors come back as a tool error with a code and a message, for example:

{ "error": { "code": "not_found", "message": "not found: document 99999" } }

Writes, safely

  • Direct. An agent applies a single record edit directly, with no preview step.
  • Journaled. Every write is one run in the journal beside the plant, recorded under the agent's name (agent:<client>).
  • Undoable. changes_undo, changes_redo and changes_revert work by operation, run or row.
  • The plant is safe. The plant file is not touched until file_save, which writes a new file or keeps a backup.
  • One writer. A second writer gets a locked error naming the holder.
  • Mass changes plan first. A change across many records shows counts and samples, then applies in one transaction.
  • Live in the app. When the workbench app has the plant open, agents write through it, so changes show in the grid and in Activity as they land.