yourappspace-mcp

v0.1.2
io.github.yourappspace/yourappspace-mcp Checked 2 hours ago Published 7 days ago

MCP 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 } }`.

ParameterTypeDescription
tableName *stringUnique lowercase system name for the new table (e.g. `customer_feedback`). Required.
displayNamestringHuman-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 } }`.

ParameterTypeDescription
fieldName *stringUnique system name for the new field (required).
tableName *stringTarget system table name (required).
displayNamestringHuman-readable column label (optional). Defaults to `camelCaseToCaption(fieldName)`.
fieldTypestringScalar data type (omit when creating a lookup via `lookupEntity`). One of: INTEGER, DOUBLE, BOOLEAN, STRING, DATETIME, DATE, TIME, TEXT, BIGINT
lookupEntitystringTarget entity `tableName` for a lookup/foreign-key field (optional; e.g. `interaction`).
lookupFieldstringReferenced 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.

ParameterTypeDescription
fieldName *stringSystem name of the non-key field to permanently delete (required).
tableName *stringTarget 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.

ParameterTypeDescription
limitintegerPage size (optional; defaults to 50 when pagination is enabled, max 500).
offsetintegerZero-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: [...] }`.

ParameterTypeDescription
idOrNamestringNumeric table ID or system `tableName` (provide either `idOrName` or `tableName`).
tableNamestringSystem `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.

ParameterTypeDescription
tableName *stringTarget system table name (required).
itemobjectSingle row payload to insert (use either `item` or `items`, not both).
itemsarrayArray of row payloads to insert in batch mode (use either `items` or `item`).
returnFieldsarrayOptional 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.

ParameterTypeDescription
tableName *stringTarget system table name (required).
filtersobjectOptional structured JSON filter object (alternative to `whereQuery`).
includeTotalbooleanOptional flag to include total matching row count in `meta.total`.
limitintegerMaximum rows to return (optional, default 50, max 500).
offsetintegerZero-based pagination offset (optional, default 0).
orderBystringOptional sort specification as a JSON array string, e.g. `[{"field":"name","direction":"asc"}]`.
paramsobjectOptional key-value bind parameters for placeholders in `whereQuery`.
whereQuerystringOptional 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.

ParameterTypeDescription
tableName *stringTarget system table name (required).
itemobjectSingle row patch object (use either `item` or `items`). Must include PK and >=1 field to update.
itemsarrayArray of row patch objects for batch update (use either `items` or `item`). Each must include PK.
returnFieldsarrayOptional 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.

ParameterTypeDescription
tableName *stringTarget system table name (required).
itemobjectSingle row delete object containing the primary key (use either `item` or `items`).
itemsarrayArray of row delete objects for batch deletion (use either `items` or `item`). Each must include PK.