list-tables
List database tables with pagination, filter by database or schema, expand columns, owners, tags, and extract specific fields using dotted paths.
Instructions
List tables with pagination and optional field expansion
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Fields to include (e.g. 'columns,owners,tags,joins') | |
| limit | No | Number of results per page | |
| before | No | Cursor for backward pagination | |
| after | No | Cursor for forward pagination | |
| database | No | Filter by database FQN | |
| databaseSchema | No | Filter by database schema FQN | |
| include | No | Include deleted entities | non-deleted |
| extractFields | No | Comma-separated dotted paths to project from response (e.g. 'id,name,owner.name,columns.*.name'). Use `*` as wildcard for arrays/objects. Wrap field names with dots in backticks. Reduces response tokens dramatically on large entities. |
Implementation Reference
- src/tools/tables.ts:19-23 (handler)The handler function for list-tables. Makes a GET request to /tables with query params (pagination, filters) and applies field extraction.
export async function listTables(params: z.infer<typeof listTablesSchema>) { const { extractFields, ...query } = params; const data = await omClient.get("/tables", query); return applyExtractFields(data, extractFields); } - src/tools/tables.ts:8-17 (schema)Zod schema defining input parameters for list-tables: fields, limit, before/after cursors, database/schema filters, include deleted, extractFields.
export const listTablesSchema = z.object({ fields: z.string().optional().describe("Fields to include (e.g. 'columns,owners,tags,joins')"), limit: z.coerce.number().optional().default(10).describe("Number of results per page"), before: z.string().optional().describe("Cursor for backward pagination"), after: z.string().optional().describe("Cursor for forward pagination"), database: z.string().optional().describe("Filter by database FQN"), databaseSchema: z.string().optional().describe("Filter by database schema FQN"), include: z.enum(["non-deleted", "deleted", "all"]).optional().default("non-deleted").describe("Include deleted entities"), extractFields: z.string().optional().describe(extractFieldsDescription), }); - src/index.ts:176-176 (registration)Registers the list-tables tool with the MCP server, linking the name, description, schema, and handler.
tool("list-tables", "List tables with pagination and optional field expansion", listTablesSchema.shape, wrapToolHandler(listTables));