Skip to main content
Glama

Read a MySQL application database

mysql_database_get
Read-onlyIdempotent

Read a MySQL application database to get its character set and collation; use an application database name from mysql_databases_list, since reserved schemas are rejected.

Instructions

Read a MySQL application database

Returns name, characterSet and collation for the selected application schema. Obtain its identifier from mysql_databases_list; reserved schemas are rejected.

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": {
      "cluster": "<cluster>",
      "database": "<database>"
    },
    "name": "mysql_database_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
clusterYesManaged cluster name; the RBAC object is namespace/cluster.
databaseYesApplication database name matching [A-Za-z_][A-Za-z0-9_$]{0,63}; use name from mysql_databases_list.
namespaceNoNamespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter.

Output Schema

NameRequiredDescriptionDefault
nameYes
collationYes
operationIdNo
characterSetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / $defs / NamespaceName
      Removed value: -{
      -  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      -  "maxLength": 32,
      -  "minLength": 2,
      -  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      -  "type": "string"
      -}
    • addedInput schema / $defs / NamespaceName_depth16
      Added value: +{
      +  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      +  "maxLength": 32,
      +  "minLength": 2,
      +  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      +  "type": "string"
      +}
    • addedInput schema / properties / cluster / description
      Added value: +"Managed cluster name; the RBAC object is namespace/cluster."
    • addedInput schema / properties / database / description
      Added value: +"Application database name matching [A-Za-z_][A-Za-z0-9_$]{0,63}; use name from mysql_databases_list."
    • changedInput schema / properties / namespace / $ref
      Previous value: -"#/$defs/NamespaceName"New value: +"#/$defs/NamespaceName_depth16"
    • addedInput schema / properties / namespace / description
      Added value: +"Namespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "characterSet": {
      +      "type": "string"
      +    },
      +    "collation": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "pattern": "^[A-Za-z_][A-Za-z0-9_$]{0,63}$",
      +      "type": "string"
      +    },
      +    "operationId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "characterSet",
      +    "collation"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.3

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world behavior, so the safety profile needs no restating. The description adds genuinely new behavioral context beyond them: the exact return fields and the rejection of reserved schemas, which is a failure mode the annotations do not convey.

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 no waste: the operation and its return shape come first, followed by the prerequisite and the rejection rule. Nothing is padded and the most load-bearing constraint is front-loaded.

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 an output schema, full annotation coverage and near-complete parameter documentation, the description covers what an agent needs to invoke this correctly. It stops short of describing the not-found/error behavior for a nonexistent database, which is the one remaining gap for a single-object get.

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%, and the schema already documents the database name format, its origin in mysql_databases_list, and the namespace fallback and 404 semantics. The description's only addition is the reserved-schema rejection, so the schema is doing nearly all the parameter work and 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?

The description names a specific verb and resource ("Read a MySQL application database") and enumerates the returned fields (name, characterSet, collation), which pins the scope to a single schema rather than a listing. It only implicitly differentiates itself from mysql_databases_list, by framing that tool as the source of the identifier rather than stating the contrast explicitly.

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?

It gives a concrete prerequisite chain ("Obtain its identifier from mysql_databases_list") and a constraint ("reserved schemas are rejected"), telling the agent both how to obtain the required argument and which inputs will fail. There is no explicit statement of when not to use it, e.g. when a full listing is wanted, so it falls short of a full when/when-not/alternatives statement.

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

Deploy Server

Other Tools