peaka_get_project_metadata
Retrieve project metadata to inspect catalogs, schemas, tables, columns, types, keys, and relations, or scope metadata by project, catalog, schema, or up to 20 tables.
Instructions
Get project metadata. For a data question: choose the tables from peaka_list_project_tables, then pass them here as tables=["catalog.schema.table", ...] (up to 20) to get their columns, types, descriptions, keys and relations in one call; format defaults to "compact" then. Otherwise scope by catalogId and/or schemaName; an unscoped call can return a large response. For metadata management, prefer peaka_list_table_metadata for one bounded page. If metadata is missing, use peaka_list_schemas, peaka_list_tables and peaka_list_columns; missing metadata does not mean no data.
format makes the result much smaller: "compact" returns { catalogs: [{ catalog, catalogId, desc }], schemas: [{ schema, desc }], tables: [{ table, desc, columns: [{ name, type, desc, pk, values }], relations }] }: the catalogs and schemas of the tables in scope with what each holds, then the tables, with names as written in SQL; "ddl" returns the catalogs and schemas as comment lines, then CREATE TABLE statements with descriptions as comments. levels picks the parts (any of catalogs, schemas, tables; all three by default): levels=["catalogs","schemas"] tells what the project's sources hold without their tables. Without format the full stored metadata is returned. includeSamples (with a format) adds distinct sample values to each column.
If you do not already know the projectId for the current task, call peaka_list_projects first and ask the user which project to use. Remember the chosen projectId for subsequent calls in this conversation.Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>"
},
"name": "peaka_get_project_metadata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Optional smaller result: "compact" (JSON) or "ddl" (CREATE TABLE text). Omit for the full stored metadata. | |
| levels | No | Parts of a compact or ddl answer: any of "catalogs", "schemas", "tables" (default all three). Implies format "compact" when no format is given. | |
| tables | No | Tables as catalog.schema.table, as peaka_list_project_tables writes them. Not with catalogId/schemaName. | |
| catalogId | No | Optional: only this catalog's metadata. The catalog's id, or its name as written in SQL (e.g. "stripe" in stripe.payment.charges). "peaka" with schemaName query or mtquery is the saved queries, with any other schema the Peaka tables. | |
| projectId | Yes | The Peaka project ID to run against. | |
| schemaName | No | Optional schema name to filter metadata by a specific schema. | |
| includeSamples | No | With format: add distinct sample values of each column. |