get-table
Retrieve detailed metadata for a specific table using its unique identifier.
Instructions
Get table details by UUID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Table UUID | |
| fields | No | OpenMetadata fields to include | |
| include | No | ||
| 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/index.ts:177-177 (registration)Registration of the 'get-table' tool with its schema and handler via the tool() helper function.
tool("get-table", "Get table details by UUID", getTableSchema.shape, wrapToolHandler(getTable)); - src/tools/tables.ts:27-32 (schema)Zod schema 'getTableSchema' defining input validation for get-table: id (UUID), fields, include, extractFields.
export const getTableSchema = z.object({ id: z.string().describe("Table UUID"), fields: z.string().optional().describe("OpenMetadata fields to include"), include: z.enum(["non-deleted", "deleted", "all"]).optional(), extractFields: z.string().optional().describe(extractFieldsDescription), }); - src/tools/tables.ts:36-40 (handler)Handler function 'getTable' that makes a GET request to /tables/{id} and applies extractFields with default fields.
export async function getTable(params: z.infer<typeof getTableSchema>) { const { id, extractFields, ...query } = params; const data = await omClient.get(`/tables/${id}`, query); return applyExtractFields(data, extractFields ?? GET_TABLE_DEFAULT_FIELDS); } - src/tools/extract-fields.ts:1-3 (helper)Helper function 'applyExtractFields' used by the handler to process response field expansions.
// Re-export from @us-all/mcp-toolkit for backward compatibility. // New code should import directly from "@us-all/mcp-toolkit". export { applyExtractFields, extractFieldsDescription } from "@us-all/mcp-toolkit"; - src/tools/tables.ts:34-34 (helper)Default fields constant used when no custom 'fields' or 'extractFields' param is provided.
const GET_TABLE_DEFAULT_FIELDS = "id,name,fullyQualifiedName,description,columns,owners,tags,database";