Skip to main content
Glama

List MySQL grants filtered by user or database

mysql_grants_list
Read-onlyIdempotent

List MySQL grants filtered by user or database to audit access permissions; at least one filter is required, and both can be combined.

Instructions

List MySQL grants filtered by user or database

At least one of user or database is required; both may be supplied.

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>"
    },
    "name": "mysql_grants_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
userNoApplication account name matching [A-Za-z_][A-Za-z0-9_]{0,31}, without a host suffix; use name from mysql_users_list. Optional filter; at least user or database must be supplied.
clusterYesManaged cluster name; the RBAC object is namespace/cluster.
databaseNoApplication database name matching [A-Za-z_][A-Za-z0-9_$]{0,63}; use name from mysql_databases_list. Optional filter; at least user or database must be supplied.
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
itemsYes
operationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 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. Optional filter; at least user or database must be supplied."
    • 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."
    • addedInput schema / properties / user / description
      Added value: +"Application account name matching [A-Za-z_][A-Za-z0-9_]{0,31}, without a host suffix; use name from mysql_users_list. Optional filter; at least user or database must be supplied."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "MySQLGrantPrivileges_depth15": {
      +      "enum": [
      +        "SELECT",
      +        "INSERT",
      +        "UPDATE",
      +        "DELETE",
      +        "CREATE",
      +        "DROP",
      +        "ALTER",
      +        "INDEX",
      +        "REFERENCES",
      +        "CREATE_VIEW",
      +        "SHOW_VIEW",
      +        "TRIGGER",
      +        "EXECUTE",
      +        "CREATE_ROUTINE",
      +        "ALTER_ROUTINE",
      +        "EVENT",
      +        "LOCK_TABLES",
      +        "CREATE_TEMPORARY_TABLES",
      +        "ALL"
      +      ],
      +      "type": "string"
      +    },
      +    "MySQLGrant_depth16": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "database": {
      +          "pattern": "^[A-Za-z_][A-Za-z0-9_$]{0,63}$",
      +          "type": "string"
      +        },
      +        "privileges": {
      +          "items": {
      +            "$ref": "#/$defs/MySQLGrantPrivileges_depth15"
      +          },
      +          "minItems": 1,
      +          "type": "array",
      +          "uniqueItems": true
      +        },
      +        "user": {
      +          "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,31}$",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "user",
      +        "database",
      +        "privileges"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "items": {
      +      "items": {
      +        "$ref": "#/$defs/MySQLGrant_depth16"
      +      },
      +      "type": "array"
      +    },
      +    "operationId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "items"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.3

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered without description help. The only added behavior information is the filter-requirement rule, which is already repeated verbatim in the schema property descriptions, so it adds little new context. No mention of result scope or authorization behavior beyond what annotations provide.

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 short sentences with the constraint front-loaded immediately after the purpose, so an agent can act without scanning. The first sentence is an exact copy of the title, which is minor wasted wording, keeping it just below top marks.

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 present, annotations covering the safety profile, and full schema description coverage, the description only needs to convey the call precondition — which it does. A reader knows what it returns (grants), what it filters on, and that one filter is mandatory; nothing critical is missing for correct invocation.

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 (user, cluster, database, namespace) is already documented in structured form with patterns and cross-references to mysql_users_list / mysql_databases_list. The description's only contribution is restating that user and database are optional-but-interdependent filters, which the schema also states. Baseline 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?

"List MySQL grants filtered by user or database" gives a specific verb (list), resource (MySQL grants) and filter axes, which separates it cleanly from sibling grant/user tools like oauth_grants_list or mysql_users_list. It stops short of naming an explicit alternative or contrasting behavior, so it is clear but not differentiated beyond the resource name.

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?

The description does state a call precondition — "At least one of user or database is required; both may be supplied" — which is genuine usage guidance for invocation shape. It offers no when-to-use/when-not-to-use context relative to alternatives (e.g. listing users or databases first, or the postgres/oauth equivalents), so guidance is implied rather than complete.

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