Skip to main content
Glama
jdbc-mcp-guard

jdbc-mcp-guard

by lyb-java

db_schema

Retrieve table column names, types, nullability, and comments with a 10-minute cache across supported JDBC databases; use it to inspect schema without writing information_schema queries.

Instructions

查表结构(列名/类型/可空/注释),带 10 分钟本地缓存;支持达梦/MySQL/PG/MSSQL/Oracle/SQLite/DB2/ClickHouse/Trino(Presto)/H2。比手写 information_schema 快且省 token。

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": {
      "table": "<table>"
    },
    "name": "db_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableYes表名(不区分大小写)
schemaNoschema/owner(默认取连接配置的 database;达梦多 schema 同表名时必填)
refreshNo跳过缓存强制刷新
connectionNo连接名,默认 default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose a real behavioral trait: a 10-minute local cache, which warns the agent about staleness and hints that a refresh path exists. It omits error behavior (e.g., missing table) and any connection/permission prerequisites, keeping it below 5.

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?

One compact sentence that front-loads the return shape, then the cache, then dialect coverage. The closing 'faster and token-saving' clause is partly promotional but still nudges the agent away from hand-written catalog queries.

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 and no annotations, yet the description enumerates the returned fields and supported engines, which is precisely what an agent needs to decide whether this tool answers its question. Nothing essential for correct invocation is missing.

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%, so each of the four parameters is already documented, including the Dameng multi-schema caveat and the default connection. The description adds only indirect meaning by mentioning the cache, which motivates the refresh flag, 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?

States a specific verb and resource ('查表结构') and enumerates exactly what is returned (column name/type/nullable/comment), which an agent can act on directly. It does not explicitly distinguish itself from sibling db_search_columns, so it falls short of a 5.

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?

Usage is only implied: '比手写 information_schema 快且省 token' suggests using this instead of raw SQL catalog queries, and the dialect list implies environment fit. There is no explicit when-not-to-use guidance or routing to db_search_columns for column-name lookups.

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