Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

find_tables_by_keyword

Read-onlyIdempotent

Finds candidate tables for a keyword by searching table and column names plus comments, helping identify which table stores concepts like survey, invoice, or feedback before reading data.

Instructions

🔎 Schema discovery: finds candidate tables for a concept or keyword by searching table names, column names, TABLE_COMMENT, and COLUMN_COMMENT metadata. Use when users ask 'which table stores X?' before reading sample data.

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": {
      "keyword": "<keyword>"
    },
    "name": "find_tables_by_keyword"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoOptional: maximum number of ranked tables to return (default 20, max 100)
keywordYesConcept or keyword to find, such as survey, invoice, feedback, or customer
databaseNoOptional: specific database name
search_inNoWhere to search (default: all)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds meaningful scope context — it searches metadata (names and comments), not row data, and returns 'candidate' ranked tables — but leaves the ranking basis and result shape unstated and there is no output schema to cover that gap.

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 with zero waste: purpose and search surface first, then the usage cue. The leading category label orients the reader fast and nothing is repeated.

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

Completeness4/5

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

For a four-parameter read-only discovery tool with full schema coverage and annotations, the description supplies what's needed to select and call it correctly. The only soft spot is that 'ranked' results are never characterized, and with no output schema the return fields remain implicit.

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 in the schema, including the 'search_in' enum and the limit bounds. The description only reinforces the notion of ranked candidates, adding little parameter-level meaning beyond what the schema provides.

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

Purpose5/5

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

States a specific verb (finds candidate tables) plus the exact search surfaces: table names, column names, TABLE_COMMENT and COLUMN_COMMENT. That mechanism-level detail makes it distinguishable from a plain table enumerator or a data-content search without needing to inspect any schema.

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 an explicit trigger ('use when users ask which table stores X?') and a sequencing rule ('before reading sample data'), which is real when-to-use guidance. It stops short of stating when not to use it or naming a sibling for cases where the user wants all tables or wants to search row values rather than metadata.

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