Skip to main content
Glama

Upload campaign file

upload_campaign_attachment

Attach one file to a campaign the caller's organization owns: a PDF, a GIF, JPEG, PNG, or WebP image, a CSV, a JSON, or a plain text file, at most 4 MB, sent as base64. The campaign, the organization, and the user each have a file limit, and uploads per hour are limited; past either it returns a tool error naming the reason. A campaign outside the organization returns not_found. Needs a credential.

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": {
      "campaignId": "<campaignId>",
      "content": "<content>",
      "contentType": "<contentType>",
      "fileName": "<fileName>"
    },
    "name": "upload_campaign_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesThe file bytes in base64, at most 4 MB once decoded
fileNameYesThe file name with its extension, such as brief.pdf
campaignIdYesCampaign id from list_campaigns
contentTypeYesThe media type of the file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare non-read-only, non-destructive, non-open-world; the description adds genuinely new behavioral facts: per-campaign/organization/user file limits, an hourly upload rate limit, a tool error that names the reason, not_found for out-of-organization campaigns, and a credential requirement. It does not say what a successful call returns (attachment id or object), which is the remaining gap.

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 a single dense paragraph with no filler sentences, and the core operation is front-loaded before the constraints. The run-on punctuation (colons and commas chaining limits, errors, and auth) makes it slightly harder to scan than a bulleted constraint list would be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter, all-required mutation with no output schema, the description covers auth, ownership scoping, size and type limits, rate limits, and error semantics, which is most of what an agent needs. The main omission is the shape of the success response, which is not recoverable from any structured field.

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 coverage is 100% and each parameter is already documented, including the contentType enum and the 4 MB decoded-size note on content. The description restates the type list and the size limit and adds only the base64 transport detail, so it sits at the baseline for a fully documented schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 ("Attach one file to a campaign") and enumerates the accepted file types and size ceiling, so the operation is unambiguous. It does not name or contrast with the sibling attachment tools (list_campaign_attachments, delete_campaign_attachment), so it stops short of full sibling differentiation.

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

Usage Guidelines3/5

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

"Attach one file" implies a single-file-per-call convention and states the ownership precondition on the campaign, which is useful context. However, it never says when to use this versus delete_campaign_attachment or list_campaign_attachments, nor when a caller should give up rather than retry after a limit error.

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