Skip to main content
Glama

Link projects to a database

LinkDatabase
DestructiveIdempotent

Lets projects that exist reach a database project: inside each linked project the database is the host <database_project_id> at its port. Takes effect at once and deploys nothing, and writes nothing into a project's /.env: put Project.database.connection's url there (GetProject include_secret_values) with DeployProject files. A project it links signs in as the apps' user, app (a Valkey's one user), or as its user of its own if CreateProject's link_databases made it one there (own_user), which nothing else makes. INVALID_ARGUMENT = a project in both link and unlink. NOT_FOUND = no such project. FAILED_PRECONDITION = database_project_id is no database; + DatabaseLinkRefusal = the app is a database, has a service named or aliased like the database, or there are 20 links already. Answers with the database's Project.

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

Input Schema

NameRequiredDescriptionDefault
linkNoApp project_ids to link.
unlinkNoApp project_ids to unlink.
workspaceNoThe workspace: its id or name (ListWorkspaces). Omit when the account has one.
database_project_idNo

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. Added

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that linking takes effect immediately, deploys nothing, and does not write .env files. It also explains authentication behavior for linked projects, the 20-link limit, and specific error/refusal conditions, which is substantial operational context for a destructive mutation.

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?

The description is front-loaded with purpose and behavior, and most details are substantive rather than filler. But it is dense and run-on, with clauses like 'which nothing else makes' that reduce readability and make the structure harder to scan.

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 four-parameter destructive tool with no output schema, the description covers the main side effects, authentication implications, error cases, and return value ('the database's Project'). It could still do more on unlink semantics and workspace handling, though the workspace schema description partially compensates.

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 75%, so link, unlink, and workspace are already documented in the schema. The description adds meaningful semantics for database_project_id by explaining that it becomes the host value inside linked projects, and it links linked-project auth behavior to the link operation.

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 states a specific action and resource: linking existing projects to a database project and making the database reachable as a host at its port. It is distinguishable from siblings such as DeployProject and CreateProject through its explicit references, though the phrasing around 'reach' is slightly indirect.

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 implied by the stated effect and by the instruction to use DeployProject after putting the connection URL in .env. However, it never explicitly says when to choose LinkDatabase versus alternatives, or when linking should be avoided.

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