Skip to main content
Glama

Attach a database to a site

attach_database
Idempotent

Bind an existing database to one owned site's Worker env (the binding name chosen at create_database time). Takes effect on the site's next function/publish deploy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesdatabase id (from list_databases)
siteSlugYesowned site slug

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already indicate idempotentHint=true. The description adds behavioral context beyond annotations by explaining that the binding takes effect on the next deploy, implying a non-immediate effect. This provides useful transparency without contradicting annotations.

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

Conciseness5/5

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

The description is two sentences long, front-loads the action, and contains no unnecessary words. Every sentence adds value, making it highly concise and well-structured.

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 simple attachment tool with two required parameters, high schema coverage, annotations, and an output schema, the description is fully complete. It explains the action, timing, and prerequisite without needing to elaborate on return values.

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?

The input schema covers 100% of parameters with clear descriptions (database id from list_databases, owned site slug). The description adds context about the binding name set at creation, but this does not significantly enhance understanding of the parameters themselves. Baseline of 3 is appropriate.

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 clearly states the action ('bind an existing database to one owned site's Worker env') and identifies the specific resources (database, site). It distinguishes from sibling tools like create_database and delete_database by focusing on binding an existing database rather than creating or deleting.

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?

The description provides clear context by stating that the binding takes effect on the next deploy and mentions the prerequisite that the binding name was set at create_database time. However, it does not explicitly list alternatives or when not to use this tool, though the context is sufficiently specific.

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