Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

search_schema

Read-onlyIdempotent

Discover where data lives by searching table names, columns, and comments, with optional guarded sample-data scans to locate matching values across MySQL databases.

Instructions

🧭 Unified schema discovery for natural-language 'where is X?' questions. Searches schema metadata by default and can optionally perform a guarded sample-data scan when mode sample_data is requested.

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": {
      "query": "<query>"
    },
    "name": "search_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
modesNoDiscovery modes (default: table_names, column_names, comments). sample_data requires read permission.
queryYesConcept or keyword to discover
tablesNoOptional: restrict sample_data mode to these tables
columnsNoOptional: restrict sample_data mode to these columns
databaseNoOptional: specific database name
max_tablesNoOptional: max tables scanned in sample_data mode (default 20, max 100)
max_resultsNoOptional: maximum combined results to return (default 20, max 100)
limit_per_tableNoOptional: max matching rows returned per table in sample_data mode (default 5, max 20)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds that data sampling is opt-in and 'guarded', which annotations do not convey, but it never explains what 'guarded' means (scan caps, cost, latency) or how metadata matches are ranked, leaving real behavioral questions unanswered.

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?

Two tightly written sentences with the primary purpose front-loaded and the mode caveat second; nothing is wasted. The emoji is decorative but does not obstruct parsing.

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 an 8-parameter tool with no output schema, the description covers intent and the sample_data caveat but says nothing about return shape — whether results are table/column names, comments, or matched row snippets — or how combined results from multiple modes are assembled. An agent can call it, but cannot predict what it gets back.

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 every parameter including modes, tables, columns, max_tables, max_results and limit_per_table is already documented in structured data. The description repeats the default mode set and the sample_data switch but adds no syntax, precedence, or interaction semantics (e.g., whether tables/columns filters apply to metadata modes too) beyond the schema.

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 ('Searches schema metadata') plus the intended question shape ('where is X?'), and the 'unified' framing hints that it aggregates several discovery modes. It does not name or distinguish itself from concrete siblings such as read_table_schema, find_tables_by_keyword, or get_schema_rag_context, so the boundary is left to inference.

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?

Gives a clear triggering context — natural-language concept/keyword lookups — and explains the default path (metadata only) versus the opt-in sample_data path. It stops short of explicit when-not guidance or naming the sibling tools an agent should prefer for table-specific or keyword-only lookups.

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