yourappspace-mcp
v0.1.2MCP server for YourAppSpace Core: visual schema designer, data grid UI, REST APIs, and RLS/FLS.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_table
Create a new custom entity type (table) in the active workspace. Schema-mutating operation requiring administrative permissions. Newly created tables automatically include system columns such as `<tableName>id` (PK) and `displayname` (required when inserting rows). Check `list_tables` first to avoid duplicates; use `add_field` afterwards to add custom columns or lookups. Returns `{ entityType: { id, tableName, displayName, dataSourceType, workspaceId } }`.
| Parameter | Type | Description |
|---|---|---|
tableName * | string | Unique lowercase system name for the new table (e.g. `customer_feedback`). Required. |
displayName | string | Human-readable table label (optional). Defaults to `tableName`. |
add_field
Add a new column or lookup relationship to an existing table. Non-destructive schema mutation (existing rows receive null for the new field); requires administrative permissions. Specify either `fieldType` for a scalar column OR `lookupEntity` (and optional `lookupField`) for a foreign-key reference. Use `create_table` to create a new table, `get_table` to inspect existing fields, and `delete_field` to remove a field. Returns `{ field: { id, fieldName, displayName, fieldType, lookupEntity, lookupField } }`.
| Parameter | Type | Description |
|---|---|---|
fieldName * | string | Unique system name for the new field (required). |
tableName * | string | Target system table name (required). |
displayName | string | Human-readable column label (optional). Defaults to `camelCaseToCaption(fieldName)`. |
fieldType | string | Scalar data type (omit when creating a lookup via `lookupEntity`). One of: INTEGER, DOUBLE, BOOLEAN, STRING, DATETIME, DATE, TIME, TEXT, BIGINT |
lookupEntity | string | Target entity `tableName` for a lookup/foreign-key field (optional; e.g. `interaction`). |
lookupField | string | Referenced field on `lookupEntity` (optional). Defaults to the lookup entity's primary key. |
delete_field
Permanently delete a non-key field from an entity type. Irreversible destructive schema mutation: removes the column definition and its stored values across all existing rows; requires administrative permissions. System/primary key fields cannot be deleted. Use `get_table` first to verify the field name, `add_field` to add columns, or `delete_rows` to delete records instead of columns. Returns confirmation of the deleted field.
| Parameter | Type | Description |
|---|---|---|
fieldName * | string | System name of the non-key field to permanently delete (required). |
tableName * | string | Target system table name (required). |
list_tables
List entity types (tables) accessible to the authenticated user (enforcing workspace permissions). Read-only. Omit both `offset` and `limit` to retrieve the full legacy list; provide `offset` and/or `limit` for paginated results. Returns `{ meta: { total, offset, limit, hasMore, returned }, items: [{ id, tableName, displayName, dataSourceType, workspaceId }] }` (or an array in legacy mode). Follow with `get_table` to inspect a table's columns.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Page size (optional; defaults to 50 when pagination is enabled, max 500). |
offset | integer | Zero-based pagination offset (optional; defaults to 0 when pagination is enabled). |
get_table
Fetch full metadata, primary key name, and column/field definitions for a single entity type. Read-only. Provide either `idOrName` (numeric table ID or system `tableName`) or `tableName`. Always call this before `create_rows`, `update_rows`, or `read_rows` to discover exact field names, data types, lookup targets, and required fields (such as `displayname`). Returns `{ entityType: {...}, fields: [...] }`.
| Parameter | Type | Description |
|---|---|---|
idOrName | string | Numeric table ID or system `tableName` (provide either `idOrName` or `tableName`). |
tableName | string | System `tableName` (alternative to `idOrName`). |
create_rows
Insert one or multiple new records into an entity type. Mutates data, enforcing row/field permissions and workspace tariff limits. Pass `item` for a single record OR `items` for batch insertion (do not pass both). Custom tables typically require `displayname`—call `get_table` first to check required fields. Bulk inserts are non-atomic: each row is processed independently and the response returns `{ count, items: [{ status: 'ok', item }], errors: [{ status: 'error', index, message }] }`. Use `update_rows` to modify existing records.
| Parameter | Type | Description |
|---|---|---|
tableName * | string | Target system table name (required). |
item | object | Single row payload to insert (use either `item` or `items`, not both). |
items | array | Array of row payloads to insert in batch mode (use either `items` or `item`). |
returnFields | array | Optional list of field names to include in each returned `item`. |
read_rows
Query records from an entity type with optional filtering, sorting, and pagination. Read-only; enforces Row-Level and Field-Level Security (RLS & FLS). Filtering options: use `whereQuery` (SQL-like condition, e.g. `rating >= 4`) with optional `params` bind map (`:paramName`), OR pass structured `filters` JSON (do not combine conflicting filters). Returns `{ meta: { offset, limit, returned, total? }, items: [...] }`. Call `get_table` first to verify filterable field names.
| Parameter | Type | Description |
|---|---|---|
tableName * | string | Target system table name (required). |
filters | object | Optional structured JSON filter object (alternative to `whereQuery`). |
includeTotal | boolean | Optional flag to include total matching row count in `meta.total`. |
limit | integer | Maximum rows to return (optional, default 50, max 500). |
offset | integer | Zero-based pagination offset (optional, default 0). |
orderBy | string | Optional sort specification as a JSON array string, e.g. `[{"field":"name","direction":"asc"}]`. |
params | object | Optional key-value bind parameters for placeholders in `whereQuery`. |
whereQuery | string | Optional SQL-like WHERE expression (e.g. `rating >= 4` or `status = :status`). |
update_rows
Partially update (patch) one or multiple existing records by primary key. Mutates data, enforcing RLS & FLS. Pass `item` for a single update OR `items` for batch updates (not both). Each object MUST include the table's primary key (`<tableName>id`) plus at least one field to update (only provided fields are modified). Bulk updates are non-atomic and return `{ count, items: [{ status: 'ok', item }], errors: [{ status: 'error', index, message }] }`. Use `create_rows` for new records or `delete_rows` to remove records.
| Parameter | Type | Description |
|---|---|---|
tableName * | string | Target system table name (required). |
item | object | Single row patch object (use either `item` or `items`). Must include PK and >=1 field to update. |
items | array | Array of row patch objects for batch update (use either `items` or `item`). Each must include PK. |
returnFields | array | Optional list of field names to include in each returned `item`. |
delete_rows
Permanently delete one or multiple records by primary key. Irreversible destructive operation enforcing RLS permissions. Pass `item` for a single delete OR `items` for batch deletion (not both). Each object only needs the primary key field (e.g. `{ "customer_feedbackid": 1 }`; other fields are ignored). Bulk deletes are non-atomic and return `{ count, items: [{ status: 'ok', item }], errors: [{ status: 'error', index, message }] }`. Use `update_rows` to modify rows or `delete_field` to drop a column.
| Parameter | Type | Description |
|---|---|---|
tableName * | string | Target system table name (required). |
item | object | Single row delete object containing the primary key (use either `item` or `items`). |
items | array | Array of row delete objects for batch deletion (use either `items` or `item`). Each must include PK. |