Skip to main content
Glama

GrowSurf

Prepare Program Resource File

growsurf_prepare_program_resource_file

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fileName": "<fileName>",
      "mimeType": "<mimeType>",
      "fileBase64": "<fileBase64>",
      "campaignId": "<campaignId>"
    },
    "name": "growsurf_prepare_program_resource_file"
  }
}

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 id for this call: the `id` returned by `growsurf_list_campaigns`, not the program name or a share URL. 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. Changed1 schema field changed
    • changedInput schema / properties / campaignId / description
      Previous 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."New value: +"Target program id for this call: the `id` returned by `growsurf_list_campaigns`, not the program name or a share URL. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations it discloses substantial behavior: a 10 MB ceiling, a one-time ticket flow, upload only to a GrowSurf-selected HTTPS destination, rejection of user-supplied upload URLs or credentials, no retry on ambiguous uploads, invalidation of altered upload results, and a server-side env requirement. These are the exact constraints an agent must know to avoid constructing an unsafe or unretryable call, and none of them are derivable from the annotations.

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?

It is front-loaded with the action and payload limits, then moves to security and failure semantics, then to environment and targeting — a sensible order with no filler sentences. The last sentence about `campaignId` targeting is the only part that restates schema content and could be trimmed.

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 four-parameter mutation with an output schema, this covers the gaps the structured fields cannot: security model, ticket lifetime, failure/retry policy, size limit, and the environment precondition that can make the tool unusable. Nothing an agent needs in order to call it correctly and safely is left implicit.

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; the description still adds usable meaning by framing the payload as "padded base64 bytes, up to 10 MB" (a decoded-size ceiling rather than the raw 13,981,016 character cap in the schema) and by restating that `campaignId` falls back to `GROWSURF_CAMPAIGN_ID`. The `campaignId` sentence largely duplicates the schema, which keeps this below a 5.

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 opens with a specific verb and resource ("Prepare a local file for a `FILE` Program Resource") and immediately clarifies its role in the workflow: it returns `uploadTicket` and `uploadResult` that are "required for file resource creation or replacement." That functionally separates it from `growsurf_create_program_resource` / `growsurf_update_program_resource` without the agent needing to open any schema.

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?

It establishes the precondition for use — a `FILE` resource with an allowed extension/MIME type — and adds an exclusion via the environment constraint: without `GROWSURF_UPLOAD_ALLOWED_ORIGINS`, "only `LINK` and `TEXT` resources are available." What is missing is an explicit pointer to the follow-up tool and an explicit statement that this tool must not be used for LINK/TEXT resources.

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.