Skip to main content
Glama
MCP Database Server

MCP Database Server

by RifkyR3

db_list_tables

List all tables and views in a target PostgreSQL or MySQL database using a connection ID or main connection plus database name, with optional schema filtering for inspection.

Instructions

List all tables and views in a target database. Provide either connectionId (sub-connection alias or "mainId:db") or mainId + database

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "db_list_tables"
  }
}

Input Schema

NameRequiredDescriptionDefault
mainIdNoMain connection ID (e.g. "postgres_main")
schemaNoFilter by schema (e.g. "public" for PostgreSQL)
databaseNoTarget database name on the main connection server
connectionIdNoSub-connection ID / alias (e.g. "app_db") or composite ("mainId:db")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral burden. "List" implies a read-only operation and the addressing rule is useful context, but it does not disclose the return format, pagination behavior, or whether schemas beyond the default are included.

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

Conciseness5/5

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

Two sentences, no filler: the operation leads, followed by the connection-addressing rule. "Command parameter" guidance is front-loaded and every clause carries information.

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?

With no annotations, no output schema, and zero required parameters, the description should be more explicit. It covers what is listed and how to target a database, but leaves the default behavior when no connection is specified, and the result shape, unaddressed.

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 coverage is 100%, so all four parameters are already documented individually, giving a baseline of 3. The description does add the mutually exclusive addressing rule (connectionId vs mainId + database) that the schema itself does not express, but it says nothing about the schema filter parameter.

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 states a specific verb and resource: "List all tables and views in a target database", including the scope (tables and views). It does not, however, distinguish this from siblings like db_list_connections or db_describe_table, so the agent must infer the boundary itself.

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

Usage Guidelines3/5

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

The second sentence gives real addressing guidance: provide connectionId or mainId + database. That answers "how to call", but it never says when to choose this over db_describe_table or db_list_connections, and it omits what happens when neither parameter is supplied despite zero required params.

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