Skip to main content
Glama
hostinger

hostinger-api-mcp

Official
by hostinger

Setup website database

hosting_setupWebsiteDatabaseV1

Creates a MySQL database for a website, writes its connection details to environment variables, and restarts the app. The password is auto-generated and read from the environment.

Instructions

Creates a new MySQL database for the website and writes its connection details into the website's environment variables, then restarts the application. The platform generates the password (and the database name and user, unless supplied). The password is never returned; the application reads it from the environment.

Written variables: DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD and DATABASE_URL (mysql://user:password@host:port/name, user and password percent-encoded). Existing variables are kept. If the website already has any variable with one of these names the call fails with 422 and nothing is created; the Replace Node.js environment variables endpoint removes them.

After this call the variables are ordinary environment variables: the Replace Node.js environment variables endpoint changes or removes them like any other.

A restart is enough for apps that read environment variables at process start, such as Express or NestJS. Frameworks that bake variables into the build output (Next.js, NEXT_PUBLIC_*) see the new values only after a fresh build (Start Node.js build endpoint).

A password in the request is ignored; the platform always generates it. The optional name and user are identifiers, not secrets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOptional database name. Generated when omitted. Letters, digits and underscores; must not start with an underscore. Up to 14 characters without the account username prefix (`u123456789_`), which is added automatically when missing. With the prefix the full name is 12 to 25 characters.
userNoOptional database user. Generated when omitted. Letters, digits and underscores; must not start with an underscore. Up to 14 characters without the account username prefix (`u123456789_`), which is added automatically when missing. With the prefix the full user is 12 to 25 characters.
domainYesDomain name
usernameYesusername parameter

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.63.4

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses far more than annotations. Annotations only state readOnlyHint=false and destructiveHint=false, which is minimal. The description explains that the platform generates the password, that a password in the request is ignored, and that existing environment variables with the same names cause a 422 failure with nothing created. It also clarifies that a restart is performed and that variables are ordinary env vars afterward. This is rich behavioral context beyond 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 well-structured with clear paragraphs: summary, variables written, failure conditions, behavior after call, and notes on frameworks. It is comprehensive but each sentence adds value, and critical information like password generation and failure conditions is front-loaded. No wasted words.

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?

Given the tool's complexity (writes multiple env vars, restarts app, has failure conditions), the description covers all aspects: what variables are set, what happens on conflict, how to remove them, and framework-specific caveats. With no output schema, return values are not explained, but the description is complete for an agent to call it correctly.

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 description coverage is 100%, so the baseline is 3. The description adds context for `name` and `user` (they are identifiers, not secrets, and are optional), but the schema already covers their format and generation. No additional semantics are needed for `domain` and `username` as the schema is clear. The description does not add substantial new meaning beyond the schema, so 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 tool creates a new MySQL database for a website, writes connection details into environment variables, and restarts the application. This distinctly separates it from sibling tools like hosting_createAccountDatabaseV1 (which creates account-level databases without website env integration) and hosting_changeDatabasePasswordV1 (which modifies existing passwords). The verb 'creates' plus the resource 'website database' is specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides scenarios for when to use this tool: it is for setting up a new database for a website. It differentiates from alternatives by noting that the 'Replace Node.js environment variables' endpoint can remove the variables, and that frameworks with build-time variables need a fresh build via the 'Start Node.js build' endpoint. This gives clear context and alternatives.

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