Skip to main content
Glama
cloud-ru-tech

mcp-server-mattermost

upload_file

Upload a local file to a Mattermost channel and get its file ID for attaching to messages.

Instructions

Upload a file to a channel.

The file will be attached to messages in the specified channel. Returns file ID that can be used when posting messages with file_ids parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameNoOverride filename
file_pathYesLocal path to the file to upload; a leading '~' is expanded
channel_idYes26-character channel identifier (e.g., 'o5w8h47pdfbzjc4d8w7dhnhren')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_idsNoClient-provided IDs
file_infosYesUploaded file information

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.1
    • changedInput schema / properties / file_path / description
      Previous value: -"Local path to the file to upload"New value: +"Local path to the file to upload; a leading '~' is expanded"
  2. First observedv0.5.1

TDQS

A4/5.0
Behavior3/5

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

Annotations only include destructiveHint: false, so the description carries some burden. It does disclose the return value (file ID for use with file_ids parameter) and the attachment behavior, which adds value. However, it omits details like authentication requirements, file size limits, or behavior on duplicate filenames. Given the sparse annotations, a 3 is appropriate – it adds some context but not comprehensive transparency.

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 two sentences with no filler. The primary action is front-loaded, and the additional detail about file attachment and return value is concise. Every sentence contributes necessary information.

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 straightforward upload tool, the description covers the core behavior and return value. It does not discuss error handling, permissions, or rate limits, but these are not essential for a simple upload operation. The output schema likely provides return format details, and annotations indicate non-destructive nature. Given the tool's simplicity, it is sufficiently complete.

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%, meaning all three parameters (channel_id, file_path, filename) are already well documented in the schema. The description adds no extra semantic detail about parameters beyond what the schema provides. The baseline of 3 applies because the schema handles 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 states a specific verb ('Upload') and resource ('a file to a channel'), and clarifies that the file is attached to messages. This distinguishes it clearly from sibling tools like download_file, get_file_info, and post_message. The purpose is unambiguous.

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 conveys the action and its effect ('attached to messages in the specified channel'), making the context obvious. However, it does not explicitly mention alternatives or when not to use it (e.g., for retrieving files). There are no exclusions, but the guidance is implicit rather than explicit.

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