Skip to main content
Glama

set_database

Switch the active project database to a Disk or PostgreSQL instance, closing the currently open project before connecting to the new database.

Instructions

Switch the project database (closes the open project). db_type is 'Disk' or 'PostgreSQL'.

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": {
      "db_name": "<db_name>"
    },
    "name": "set_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
db_nameYes
db_typeNoDisk
ip_addressNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, and the description adds real value by disclosing the side effect that the open project is closed and by listing the accepted db_type values (the schema has no enum). However, it says nothing about what happens to unsaved work when the project closes, or how ip_address interacts with the PostgreSQL backend.

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 tight sentences with the main action and its side effect front-loaded, and zero filler. The second sentence could have been used to also cover ip_address rather than stopping at the db_type values.

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

Completeness3/5

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

For a 3-parameter switching tool with no output schema and no annotation coverage of semantics, the description covers the action, its side effect, and one parameter's legal values. It falls short on the required db_name and on the conditional ip_address, which an agent needs to construct a correct call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, yet it only documents one of three parameters (db_type). db_name — the sole required parameter — and ip_address have no meaning attached anywhere, leaving the agent to guess what a "db_name" is and when an IP is needed.

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 ("Switch the project database") and adds a concrete consequence ("closes the open project"). It is clearly distinct from sibling setters like set_project_settings or set_timeline_settings, though it never explicitly contrasts itself with them.

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: the parenthetical clause signals that this is a disruptive operation, so an agent can infer caution before calling. There is no explicit when-to-use/when-not guidance, no prerequisite (e.g., whether a project must be closed first), and no named alternative.

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