Table, Bro

v1.3.0
io.github.table-bro/table-bro Checked 8 hours ago Published 7 days ago

Pixel-perfect Material data tables for your app in one prompt: Claude Code, Cursor, Codex.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_started Get started with Table, Bro

Call this first, once per session. It explains how Table, Bro works, a Web Components table engine on top of the UI library of your project, and which tool to use when; shows a minimal table for your target and skin; lists the topics of get_docs. Do not call it again in the same session: use get_docs. Example: {"target": "angular", "skin": "mat"}

ParameterTypeDescription
skinstringThe skin, the UI library the table works on top of: mat (Angular Material), mui (MUI for React and Preact, with the target vanilla), suid (SUID for Solid, with the target vanilla), m3-svelte (M3 Svelt…
targetstringThe target: angular for an Angular project, through the wrapper <table-bro-ng>; vanilla for a page without a framework or a project of React, Preact, Solid, Svelte or Vue, the Custom Element <table-br…

get_docs The reference of Table, Bro

Returns one topic of the reference or one page of Docs with its code by its name, the two topics that match a query best, or all topics with their summaries. Use it for questions about the API and for changes of an existing table; get_started already gives the topics basics and workflow. Example: {"topic": "server-mode"} or {"query": "row height"}

ParameterTypeDescription
querystringThe words to search the topics for, as row height; without topic
topicstring

inspect_project Inspect the project

Profiles the project: the packages of Table, Bro and their version, the framework, the registered skins, the CSS, the custom elements, the tables, and the problems of the setup with their fixes. Call it once before you add code to a project, and when a table does not render. Pass skins.registered as the skin and framework.name as the target of the other tools. Not for questions about the API. Each list keeps its first 20 items; omitted counts the rest. It reads the project as text and writes nothing. Example: {}

ParameterTypeDescription
pathstringThe root of the project. Without it, the first root of the workspace that the client gives, else the folder where the server was started

validate_spec Check a table spec

Checks a table spec, a BroTableSpec (get_docs, topic spec), and reports every error and warning with its path, what is wrong and the fix. Use it while you draft a spec. generate_code runs the same check first and returns the same report for a spec with errors. Example: {"spec": {"specVersion": 1, "rowType": "Product", "fields": [{"name": "title", "type": "string"}], "cols": [{"title": "Product", "name": "title"}]}, "skin": "mat"}

generate_code Generate the code of a table

Generates the code of a new table from a spec or from a built-in spec: the files, the setup of the project, once per project, and what is left to finish by hand. The fillings are the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config (get_docs, topic fillings); without them the files keep TODOs. A spec with errors returns the report of validate_spec and no files. For one cell, the row details or the filters of an existing table use scaffold_component. Example: {"builtinSpec": "products", "target": "angular", "skin": "mat"}

ParameterTypeDescription
skin *stringThe skin, the UI library the table works on top of: mat (Angular Material), mui (MUI for React and Preact, with the target vanilla), suid (SUID for Solid, with the target vanilla), m3-svelte (M3 Svelt…
target *stringThe target: angular for an Angular project, through the wrapper <table-bro-ng>; vanilla for a page without a framework or a project of React, Preact, Solid, Svelte or Vue, the Custom Element <table-br…
builtinSpecstringThe name of a built-in spec instead of a spec: orders, Orders with custom cells and their actions, row details, filters in the Filter Drawer, buttons of the toolbar, a message of a state and a taller…
fillingsobjectThe parts of the code that you write: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config; get_docs, topic fillings
specA BroTableSpec, as the JSON Schema of the spec of validate_spec describes it

scaffold_component Scaffold a component of a table

Scaffolds one component for an existing table: a custom cell, the element of the row details, or the filters of the Filter Drawer, and tells how to connect it to the page: the registration of the element and its column, or the container of the drawer. For a new table use generate_code, which writes its cells too. Example: {"kind": "cell", "target": "angular", "skin": "mat", "rowType": "Order", "fields": [{"name": "status", "type": "string"}], "name": "status", "shows": "the status as a chip", "reads": ["status"]}

ParameterTypeDescription
fields *arrayThe fields of the row: name, type (string, number, boolean or string[]) and, for a string field, its values
kind *stringWhat to scaffold: cell, a custom cell of a column; details, the element of the row details; filters, the filters of the Filter Drawer
rowType *stringThe name of the type of a row in PascalCase, as Order
skin *stringThe skin, the UI library the table works on top of: mat (Angular Material), mui (MUI for React and Preact, with the target vanilla), suid (SUID for Solid, with the target vanilla), m3-svelte (M3 Svelt…
target *stringThe target: angular for an Angular project, through the wrapper <table-bro-ng>; vanilla for a page without a framework or a project of React, Preact, Solid, Svelte or Vue, the Custom Element <table-br…
actionsarrayFor a cell: the actions that it sends in its output action, as edit; the table gives them to the page as bro-action with the column and the row
fillingobjectFor a cell or the details, the code that you write: {imports, template, styles, members} for an Angular project, {render, members} for Vanilla JS; get_docs, topic fillings
filtersarrayFor filters: the filters of the Filter Drawer, in the form of filters of a spec; get_docs, topic filters
namestringFor a cell or the details: its name in kebab-case, as status; the tag of the element is bro-cell-<row-type>-<name>
readsarrayFor a cell or the details: the names of the fields of the row that it reads
showsstringFor a cell or the details: what it shows, in words, as the status as a chip