Skip to main content
Glama
Bytebase MCP

Bytebase MCP

Official

get_schema

Inspect a Bytebase database schema to review tables, columns, and table details before writing queries or proposing changes. Use database, schema, or table filters to narrow results.

Instructions

Inspect a Bytebase database's schema.

Parameter

Required

Description

database

Yes

Database name or substring (e.g., "employee_db" or "employee")

instance

No

Workspace instance ID/name, or the full canonical name for a project instance

project

No

Project name or ID to narrow resolution

schema

No

Schema name for multi-schema engines (PG/MSSQL/Oracle/Snowflake/Redshift/CockroachDB/Databricks/Trino/Spanner/Hive); ignored with a note on MySQL/TiDB/etc.

table

No

Drill into a single table; implies include="details"

include

No

Detail level: "summary" (default), "columns", "details"

Usage:

  • First call: get_schema(database="employee") → compact overview

  • Drill down: get_schema(database="employee", table="orders") → full table detail

  • Write a query: get_schema(database="employee", include="columns") → all tables with columns

Notes:

  • Metadata is auto-synced on access. The first call to a stale database may take longer.

  • For databases with many tables, columns/details modes return up to 200 tables PER SCHEMA. Use schema= or table= to narrow further.

  • Column masking metadata is only returned when table= is set.

  • rowCountEstimate is the row count the last metadata sync recorded. It can be an estimate, and can read 0 for a table that has rows; run a COUNT query when the number matters.

  • Requires bb.databases.getSchema permission.

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": {
      "database": "<database>"
    },
    "name": "get_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableNo
schemaNo
includeNo
projectNo
databaseYes
instanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the required permission (bb.databases.getSchema), auto-sync behavior and first-call latency, a hard 200-tables-per-schema cap on columns/details modes, that column masking metadata appears only when table= is set, and that rowCountEstimate can be stale or zero. These are exactly the operational caveats an agent needs before calling.

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?

Front-loaded with a one-line purpose, then parameters, then usage patterns, then caveats — a logical order with scannable headers. It runs long and the parameter table partly restates the schema, but that restatement is justified given zero schema description coverage.

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?

For a 6-parameter read tool with no annotations and no output schema, the definition covers permissions, engine-specific behavior, truncation limits, metadata freshness, and worked call examples. There is no meaningful gap an agent would hit during selection or invocation.

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 description coverage is 0%, so the description must compensate, and the embedded parameter table does: it marks required vs optional, gives example values for database, enumerates the include levels (summary default, columns, details), lists the multi-schema engines where schema applies and notes it is ignored on MySQL/TiDB, and states that table= implies include="details".

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

Purpose4/5

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

"Inspect a Bytebase database's schema" gives a specific verb and resource, and the usage examples make the read-only inspection scope concrete (overview, drill-down, column listing). It does not name a sibling such as query_database as the alternative for actually running SQL, so an agent must infer the read-only/metadata-only boundary.

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

Usage Guidelines4/5

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

The Usage block supplies three concrete calling patterns (first call overview, table drill-down, columns mode for writing a query), which is unusually actionable guidance. What is missing is explicit when-not-to-use routing, e.g. telling the agent to use query_database instead when it needs actual row data.

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