Skip to main content
Glama
peaka-mcp-server

peaka-mcp-server

Official
by peakacom

peaka_get_project_metadata

Read-only

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

NameRequiredDescriptionDefault
formatNoOptional smaller result: "compact" (JSON) or "ddl" (CREATE TABLE text). Omit for the full stored metadata.
levelsNoParts of a compact or ddl answer: any of "catalogs", "schemas", "tables" (default all three). Implies format "compact" when no format is given.
tablesNoTables as catalog.schema.table, as peaka_list_project_tables writes them. Not with catalogId/schemaName.
catalogIdNoOptional: 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.
projectIdYesThe Peaka project ID to run against.
schemaNameNoOptional schema name to filter metadata by a specific schema.
includeSamplesNoWith format: add distinct sample values of each column.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.15.5
    • changedInput schema / properties / catalogId / description
      Previous value: -"Optional catalog ID to filter metadata by a specific catalog."New value: +"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."
    • addedInput schema / properties / levels
      Added value: +{
      +  "description": "Parts of a compact or ddl answer: any of \"catalogs\", \"schemas\", \"tables\" (default all three). Implies format \"compact\" when no format is given.",
      +  "items": {
      +    "enum": [
      +      "catalogs",
      +      "schemas",
      +      "tables"
      +    ],
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / tables
      Added value: +{
      +  "description": "Tables as catalog.schema.table, as peaka_list_project_tables writes them. Not with catalogId/schemaName.",
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
  2. Changed2 schema fields changedv0.15.4
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "Optional smaller result: \"compact\" (JSON) or \"ddl\" (CREATE TABLE text). Omit for the full stored metadata.",
      +  "enum": [
      +    "compact",
      +    "ddl"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / includeSamples
      Added value: +{
      +  "description": "With format: add distinct sample values of each column.",
      +  "type": "boolean"
      +}
  3. First observedv0.11.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/non-destructive/closed-world, and the description adds substantive behavior on top: an unscoped call can return a large response, format shrinks results, includeSamples requires a format, and missing metadata does not mean there is no data. These are non-obvious operational facts an agent would otherwise only learn by trial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Usage guidance is front-loaded before the format semantics, and the trailing projectId note is placed last, which is the right order. The format paragraph is one very long sentence packing two return shapes, so it is dense rather than wasteful — informative but harder to scan than it needs to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the return-value burden and does so by describing the compact JSON shape (catalogs/schemas/tables/columns/relations) and the ddl comment-plus-CREATE-TABLE shape, plus the unformatted fallback. Nothing an agent needs to call this correctly against a 7-parameter tool is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description still adds real meaning: tables must be in catalog.schema.table form as written by peaka_list_project_tables and implies compact format, levels can be used to inspect sources without their tables, and catalogId accepts a SQL name like "stripe" or the special "peaka" value for saved queries. This goes well past restating the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (get project metadata) and immediately defines what that metadata contains: columns, types, descriptions, keys and relations. It explicitly separates itself from peaka_list_project_tables, peaka_list_table_metadata, and the list_schemas/tables/columns family, so an agent can choose correctly without opening other schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete routing rules: for a data question, pick tables from peaka_list_project_tables and pass them here; for metadata management use peaka_list_table_metadata for one bounded page; if metadata is missing fall back to list_schemas/tables/columns; if projectId is unknown call peaka_list_projects first. Both when-to-use and when-not-to-use are covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.