Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

get_schema_rag_context

Read-onlyIdempotent

Retrieves compact MySQL schema details for LLM context windows, including tables, columns, keys, relationships, and row estimates; use keyword filtering to focus on relevant tables.

Instructions

🎯 AI-OPTIMIZED: Returns ultra-compact schema information (tables, columns, keys, relationships, comments, row estimates) designed specifically for LLM context windows. Use keyword_filter for concept-focused schema discovery.

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": "get_schema_rag_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoOptional: specific database name
max_tablesNoOptional: maximum number of tables to include (default 50, max 200)
max_columnsNoOptional: maximum number of columns per table (default 12, max 200)
keyword_filterNoOptional: only include tables relevant to this keyword, ranked by table names, column names, and comments
include_commentsNoOptional: include TABLE_COMMENT and COLUMN_COMMENT metadata (default: false)
include_relationshipsNoWhether to include FK relationships section (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered without the text. The description adds that output is deliberately compact and bounded for context windows, which is useful beyond the annotations, but it says nothing about truncation risk when limits are hit or what the response looks like structurally.

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

Conciseness3/5

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

Two sentences, front-loaded and short, but the '🎯 AI-OPTIMIZED:' prefix and all-caps marketing framing spend space on tone rather than information. The second sentence is functional and the first carries the substance, so the noise is minor but avoidable.

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?

With six optional parameters, full schema coverage, annotations present and no output schema, the description does the remaining work of enumerating what the returned schema includes and its compact intent. The gap is that it never clarifies how this differs from the several sibling schema tools or what happens when limits truncate results.

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 defaults and per-parameter meaning are already documented. The description only reinforces that keyword_filter drives concept-focused discovery; it adds no syntax, interaction, or precedence detail (e.g., how keyword_filter interacts with max_tables) 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?

The description states a specific verb and resource — returns compact schema information covering tables, columns, keys, relationships, comments and row estimates — and frames it for LLM context windows. It does not name or contrast with any sibling such as read_table_schema or get_schema_erd, so an agent must infer the difference 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?

Usage is only implied: 'designed specifically for LLM context windows' suggests when it fits, and 'Use keyword_filter for concept-focused schema discovery' is a hint for one parameter rather than a when-to-use rule. There is no explicit when-not guidance or named alternative, so the agent gets directional but not decisive routing help.

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