Skip to main content
Glama

Create a database

CreateDatabase

A database project, Postgres, MariaDB (for an app that asks for MySQL or MariaDB) or Valkey: the machine writes its compose.yaml and /.env and deploys it, with no address. Make it before the app that uses it: the app reaches it at the host <project_id> once linked (the app's CreateProject link_databases, which may follow at once, as its deploy waits for this one; link or LinkDatabase for an app that exists, as the apps' user and writing nothing into its /.env), and Project.database says how to sign in. Or a copy of a database's snapshot, with passwords of its own and none of its links. Answers as CreateProject does. INVALID_ARGUMENT = an engine or a size Machine.database_engines does not offer, or a project_id with "_", that is a number or that every container's /etc/hosts names (it is the host name apps use). NOT_FOUND = no such snapshot or app. FAILED_PRECONDITION = the snapshot is of no database of that engine; + DatabaseLinkRefusal = an app of link cannot be linked, and nothing was created.

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": "CreateDatabase"
  }
}

Input Schema

NameRequiredDescriptionDefault
linkNoApp project_ids, linked before its operation ends.
engineNoDATABASE_ENGINE_MARIADB: MySQL's protocol: for an app that asks for MySQL or MariaDB.
metadataNoWhat people see, e.g. {name: "Postgres for Recipes"}. Absent = the machine's (the id).
workspaceNoThe workspace: its id or name (ListWorkspaces). Omit when the account has one.
project_idNoAs CreateProject's, without "_", not a number and no name of /etc/hosts: it is the host name apps use.
operation_idNoAs DeployProject's operation_id.
wait_secondsNoAs DeployProject's wait_seconds.
from_snapshot_idNoA snapshot of a database of `engine` (Project.snapshots, GetMachine.deleted_projects): the new one starts with its data. Empty = an empty database.
memory_limit_bytesNoOne of the engine's DatabaseEngineOffer.sizes. 0 = its default_memory_limit_bytes; a copy keeps its snapshot's.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / workspace
      Added value: +{
      +  "description": "The workspace: its id or name (ListWorkspaces). Omit when the account has one.",
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / engine / description
      Added value: +"DATABASE_ENGINE_MARIADB: MySQL's protocol: for an app that asks for MySQL or MariaDB."
    • changedInput schema / properties / engine / enum
      Previous value: -[
      -  "DATABASE_ENGINE_POSTGRES",
      -  "DATABASE_ENGINE_VALKEY"
      -]New value: +[
      +  "DATABASE_ENGINE_POSTGRES",
      +  "DATABASE_ENGINE_VALKEY",
      +  "DATABASE_ENGINE_MARIADB"
      +]
    • addedInput schema / properties / metadata
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "What people see, e.g. {name: \"Postgres for Recipes\"}. Absent = the machine's (the id).",
      +  "properties": {
      +    "description": {
      +      "description": "One line.",
      +      "type": "string"
      +    },
      +    "emoji": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "description": "Empty = none: people see the id.",
      +      "type": "string"
      +    },
      +    "notes": {
      +      "description": "Free text.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (non-destructive, non-idempotent, open-world), it discloses that the machine writes compose.yaml and /.env, that the database has no address and is reached only at host `<project_id>` once linked, that link writes nothing into the app's /.env, and that a snapshot copy gets fresh passwords and none of the links. It also documents failure semantics including atomicity ("nothing was created") across INVALID_ARGUMENT, NOT_FOUND and FAILED_PRECONDITION.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Everything present is substantive, but it is delivered as one telegraphic run-on paragraph with dropped articles and parenthetical asides, forcing the agent to re-parse. The critical facts (what it creates, link ordering, host name) are not front-loaded as distinct sentences, so structure works against readability.

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 9-parameter mutation tool this is unusually complete on inputs, host naming and error cases, but the return value is deferred to "Answers as CreateProject does," and no output schema exists to fall back on — an agent without CreateProject's definition cannot tell what it receives. Deploy/wait semantics are likewise delegated to DeployProject rather than restated.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns above that by adding cross-parameter constraints the schema leaves implicit — the project_id rules that matter because it becomes the /etc/hosts host name, from_snapshot_id needing a snapshot of that same `engine`, and a copy inheriting its snapshot's memory limit. Some text still merely restates enum/schema wording.

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 the resource (a database project in Postgres, MariaDB or Valkey) and the concrete action (writes compose.yaml and /.env and deploys it), and it distinguishes itself from CreateProject and LinkDatabase by describing the linking path. It lacks a clean leading verb and reads as a fragment, so an agent must assemble the purpose from the sentinel clauses.

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 explicit sequencing ("Make it before the app that uses it") and routes to alternatives: `link` at creation time versus `link`/LinkDatabase for an app that already exists, plus the snapshot-copy variant. It stops short of stating when *not* to use it (e.g. cloning vs. snapshotting tradeoffs), but the primary selection context is clear.

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.

Resources