Skip to main content
Glama

get_database_schema

Read-onlyIdempotent

Retrieve a database's tables and columns by database ID, with optional table filters and detail levels for schema exploration.

Instructions

Get tables and columns for a database

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_id": "<database_id>"
    },
    "name": "get_database_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNoLevel of detail. "tables_only" returns table names without columns
formatNoResponse format (default: compact). Use "default" for pretty-printed output
tablesNoFilter to specific table names
database_idYesDatabase ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed3 schema fields changedv1.3.0
    • addedInput schema / properties / detail
      Added value: +{
      +  "description": "Level of detail. \"tables_only\" returns table names without columns",
      +  "enum": [
      +    "full",
      +    "tables_only"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "Response format (default: compact). Use \"default\" for pretty-printed output",
      +  "enum": [
      +    "default",
      +    "compact"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / tables
      Added value: +{
      +  "description": "Filter to specific table names",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. First observedv1.1.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the safety profile is covered. The description adds nothing beyond that: it does not mention the default detail level, whether the operation is cheap or expensive on large databases, or how filtering interacts with the returned column set. With the annotation bar lower, a thin sentence like this still adds no behavioral context.

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?

The definition is a single front-loaded sentence with zero filler, so it is easy to scan. It is arguably too terse rather than padded, which keeps it at 4.

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

Completeness3/5

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

For a read-only four-parameter tool with a fully documented schema and explicit annotations, the description is minimally adequate. It omits any note about default format behavior or how the tables filter narrows output, but those gaps are partially absorbed by the schema.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema itself documents detail, format, tables, and database_id with enum values. The description contributes no additional semantics about parameters, so the baseline of 3 applies.

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?

The description names a specific verb and resource: "Get tables and columns for a database." That tells an agent exactly what data comes back, which is more informative than a bare "get_schema." It stops short of distinguishing this from siblings like list_databases or search_content, so it lands at 4 rather than 5.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of prerequisites, and no named alternative such as list_databases for discovering which database_id to pass. Usage is only implied by the tool name, leaving the agent to infer the call sequence.

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