Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

get_table_size

Read-onlyIdempotent

Retrieve data and index size for a specific table or all tables, optionally filtered by database, to monitor storage usage and identify large tables.

Instructions

Gets size information for one or all tables including data and index sizes.

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_table_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoOptional: specific database name
table_nameNoOptional: specific table name (omit for all tables)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A3.5/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 a closed-world scope, so safety is covered. The description adds value by saying the result includes both data and index sizes, but says nothing about permissions, cost on large schemas, or the shape/units of the returned sizes.

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?

A single front-loaded sentence with no filler; the verb and scope come first and the returned metrics close it out. It borders on thin rather than verbose, so there is no wasted wording to trim.

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 simple read-only tool with two optional, fully documented parameters and no output schema, the description is nearly sufficient — it even names the metrics returned, compensating for the absent output schema. The remaining gap is minor: units/precision of the sizes and whether results are per-table rows are unspecified.

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 both parameters (database, table_name) are already fully documented, making 3 the baseline. The description reinforces the optionality of table_name via 'one or all tables' but adds no meaning about the database parameter or interactions between the two.

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 ('Gets size information for... tables') and adds scope ('one or all tables') plus the content of the result ('data and index sizes'). This distinguishes it from siblings like get_table_status or get_index_info, though no sibling is named explicitly.

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: 'omit table_name for all tables' and the one-vs-all distinction are present, which gives a hint about when to call it broadly vs narrowly. There is no explicit guidance on when to prefer this over get_table_status, get_database_summary, or get_index_info.

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