Skip to main content
Glama
hostinger

hostinger-api-mcp

Official
by hostinger

agency-hosting_generateUploadURLV1

Generate an authenticated upload URL for resumable file transfers to an Agency Plan website's storage. Returns credentials for TUS 1.0.0 uploads.

Instructions

Generate a file browser upload URL with authentication credentials for uploading files to an Agency Plan website's file storage.

Returns url, auth_key and rest_auth_key. Use these to upload a file to the website's file storage via the TUS resumable upload protocol (TUS 1.0.0). Send X-Auth: {auth_key} and X-Auth-Rest: {rest_auth_key} headers on every request below.

  1. Create the upload: POST to {url}/{relative_file_path}?override=true with headers upload-length: {file size in bytes} and upload-offset: 0. Expect 201 Created.

  2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or PATCH requests with an upload-offset header tracking progress) until complete.

relative_file_path is the destination path inside the website's file storage, e.g. app.zip.

Instead of a TUS client, plain curl also works:

FILE=app.zip
SIZE=$(stat -f%z "$FILE")   # stat -c%s on Linux

curl -i -X POST "{url}/${FILE}?override=true" \
  -H "X-Auth: {auth_key}" \
  -H "X-Auth-Rest: {rest_auth_key}" \
  -H "Tus-Resumable: 1.0.0" \
  -H "Upload-Length: ${SIZE}" \
  -H "Upload-Offset: 0"
# -> 201 Created

curl -i -X PATCH "{url}/${FILE}?override=true" \
  -H "X-Auth: {auth_key}" \
  -H "X-Auth-Rest: {rest_auth_key}" \
  -H "Tus-Resumable: 1.0.0" \
  -H "Content-Type: application/offset+octet-stream" \
  -H "Upload-Offset: 0" \
  --data-binary "@${FILE}"
# -> 204 No Content, Upload-Offset response header equals SIZE when done

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
website_uidYesAgency Plan website UID
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: it discloses the exact return values, required headers, TUS protocol steps, status codes, and even a full curl example. This makes the tool's behavior and follow-up actions transparent and predictable, going well beyond a vague summary.

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 long but well-structured and front-loaded: a one-sentence summary, then return values, then numbered TUS protocol steps, then a practical curl example. Every sentence adds value for the agent, and the length is justified by the complexity of the upload protocol.

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 moderate complexity and the lack of an output schema, the description is impressively complete. It explains not only what the tool returns but exactly how to use those returns to complete the upload, including status codes, headers, and endpoint behavior. No critical information appears missing for an agent to successfully invoke and follow through.

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 schema provides 100% coverage for the single parameter website_uid, albeit with a minimal description. The tool description adds context by tying the UID to the Agency Plan website's file storage but does not add format, validation, or expected examples beyond what the schema states. Baseline 3 is appropriate because the schema does the heavy lifting.

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's purpose with a specific verb ('Generate a file browser upload URL with authentication credentials') and identifies the target resource ('Agency Plan website's file storage'). It also names the exact return values (url, auth_key, rest_auth_key), which distinguishes it from siblings like hosting_generateUploadURLV1 by scoping to Agency Plan websites.

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 clearly indicates when the tool is appropriate: for uploading files to an Agency Plan website's file storage. It provides a comprehensive protocol for using the returned credentials, but does not explicitly contrast with alternative tools or state when not to use this tool, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hostinger/api-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server