Skip to main content
Glama
growsurf

GrowSurf MCP Server

Official

Prepare Program Resource File

growsurf_prepare_program_resource_file

Prepares a local file for a GrowSurf FILE program resource by validating name, MIME type, and base64 bytes, then returns the upload ticket and result needed to create or replace it.

Instructions

Prepare a local file for a FILE Program Resource. Accepts a safe file name, matching supported MIME type, and padded base64 bytes, up to 10 MB. GrowSurf requests a one-time ticket and uploads only to the secure HTTPS destination selected by GrowSurf. Returns the original uploadTicket and uploadResult required for file resource creation or replacement. Altered upload results are not valid. The tool does not accept upload URLs or credentials and never retries an ambiguous upload. Requires GROWSURF_UPLOAD_ALLOWED_ORIGINS on the server; without it, only LINK and TEXT resources are available. Targets campaignId if supplied, otherwise GROWSURF_CAMPAIGN_ID.

Input Schema

NameRequiredDescriptionDefault
fileNameYesA safe base name with an allowed extension: jpg/jpeg/png/gif/webp/pdf/csv/zip/doc/docx/xls/xlsx/ppt/pptx.
mimeTypeYesThe supported MIME type matching fileName's extension.
campaignIdYesTarget program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server.
fileBase64YesCanonical padded base64 file bytes only. Do not include a data-URL prefix or whitespace.

Output Schema

NameRequiredDescriptionDefault
uploadResultNoThe minimal signed upload confirmation. Pass it unchanged to create/update.
uploadTicketNoThe one-time GrowSurf ticket. Pass it unchanged to create/update.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.19.15
    • addedInput schema / properties / campaignId / minLength
      Added value: +1
    • changedInput schema / required
      Previous value: -[
      -  "fileName",
      -  "mimeType",
      -  "fileBase64"
      -]New value: +[
      +  "fileName",
      +  "mimeType",
      +  "fileBase64",
      +  "campaignId"
      +]
  2. Changed1 schema field changedv0.19.9
    • changedInput schema / properties / campaignId / description
      Previous value: -"Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Pass the `id` returned by growsurf_create_campaign to configure or operate a program you just created, without restarting the server."New value: +"Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server."
  3. Addedv0.14.0

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavioral detail beyond annotations: uploads only to a GrowSurf-selected HTTPS destination, rejects upload URLs/credentials, never retries ambiguous uploads, and notes altered results are invalid. It also discloses the server env-var gate and the campaignId fallback to GROWSURF_CAMPAIGN_ID, none of which the annotations convey.

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

Conciseness4/5

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

Front-loads the core purpose, then layers constraints and behavioral notes. Every sentence carries distinct, non-redundant information, though the density is on the heavier side for the tool's scope.

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 an output schema exists, return-value detail is optional, yet the description still names the returned fields. Combined with the env-var requirement, size limit, and campaign targeting rules, the definition is complete for correct invocation.

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, but the description adds meaningful constraints not in the schema—the 10 MB size ceiling, that bytes must be padded base64 with no data-URL prefix, and that the file name must be safe with a matching MIME type.

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?

States a specific verb ('Prepare') and resource ('a local file for a `FILE` Program Resource'), and clarifies it is a prerequisite step producing an upload ticket rather than the resource itself. This distinguishes it from sibling tools like growsurf_create_program_resource.

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?

Provides clear context: the tool returns uploadTicket/uploadResult 'required for file resource creation or replacement,' and it names the server prerequisite (GROWSURF_UPLOAD_ALLOWED_ORIGINS) whose absence limits you to LINK/TEXT resources. It stops short of explicitly naming the downstream sibling to call next.

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