Skip to main content
Glama

Change a database user's access

set_database_user_access
DestructiveIdempotent

Sets the logical databases a user connects to (databases: a list, or null for all of them, future ones included) and whether it only reads; a field left out keeps its value. Applied within seconds; where its access is removed or lowered, its open connections are closed, so tell the user first if an application uses it. Not on the admin (it always has every database) nor on Valkey. Scope: databases.write.

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": {
      "database": "<database>",
      "username": "<username>"
    },
    "name": "set_database_user_access"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseYesDatabase id, as returned by list_databases or create_database.
usernameYesLowercase letters, digits and _, starting with a letter or _.
databasesNoLogical databases it may connect to; null for all of them, future ones included.
read_onlyNotrue: SELECT only (MySQL, MariaDB: SELECT and SHOW VIEW); false: reads and writes. Omitted: left as is.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / read_only / description
      Added value: +"true: SELECT only (MySQL, MariaDB: SELECT and SHOW VIEW); false: reads and writes. Omitted: left as is."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: states latency (applied within seconds), a concrete destructive consequence (open connections closed where access is removed or lowered), who is exempt (admin always has all databases, Valkey unsupported), and the required OAuth scope. The null-means-all-including-future-databases semantic is a real behavioral disclosure that annotations cannot convey.

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?

Dense but front-loaded: the primary behavior comes first, then merge semantics, then the caution, then scope. Minor nesting of clauses in the second sentence slightly reduces scannability, but no sentence is wasted.

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

Completeness5/5

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

For a mutation tool with four fully documented parameters, no output schema, the description supplies everything an agent needs: what changes, what is preserved, the destructive side effect and the warning duty, exclusions, and the required scope.

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% and each parameter already has a description, so the baseline applies. The description reinforces the two most consequential semantics (null = all, including future databases; omitted = unchanged) but adds no syntax or edge-case detail beyond the schema.

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?

The description names a specific verb+resource (sets a database user's logical database access and read-only flag) and explicitly bounds scope: not on the admin user, not on Valkey. An agent can distinguish it from set_database_public_access or create_database_user from the text alone.

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 states the pre-condition warning (notify the user before lowering/removing access because connections get closed), the merge semantics (omitted field keeps its value), and the exclusions (admin, Valkey). It does not name sibling alternatives, but the exclusions give clear when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.