Skip to main content
Glama

Upload File Attachment

upload_file

Attach files like logs or screenshots to any MantisBT issue using a local file path or base64 content, without altering issue fields or status.

Instructions

Upload a file as an attachment to a MantisBT issue. Adds the file to the issue without modifying any issue fields or status. Returns the created attachment metadata on success.

Provide exactly one of the two input modes:

  • file_path (preferred): absolute path to a local file — use this whenever the file exists on disk; the server reads and encodes it automatically; filename is derived from the path

  • content: Base64-encoded file content — only use this when the file is not accessible via a path (e.g. in-memory data); filename must be supplied explicitly via the filename parameter

The optional content_type sets the MIME type (e.g. "image/png"); defaults to "application/octet-stream". Use the optional description to annotate the attachment.

Use this tool to attach files such as logs, screenshots, or patches to an existing issue. To list existing attachments, use list_issue_files. To retrieve issue details, use get_issue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoFallback: Base64-encoded file content — only use when file_path is not available (mutually exclusive with file_path)
filenameNoFile name for the attachment (required when using content; overrides the derived name when using file_path)
issue_idYesNumeric issue ID
file_pathNoPreferred: absolute path to the local file to upload — use this whenever the file exists on disk (mutually exclusive with content)
descriptionNoOptional description for the attachment
content_typeNoMIME type of the file, e.g. "image/png" (default: "application/octet-stream")
Behavior5/5

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

Beyond annotations (readOnlyHint=false, destructiveHint=false), description states the tool adds without modifying other fields or status, and returns attachment metadata on success. No contradiction.

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?

First sentence states purpose, then explains input modes, then parameters, then use cases. Each sentence is essential, no wasted words.

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?

Given 6 parameters, no output schema, description is thorough. It covers all parameters and return value. Could optionally detail returned metadata fields, but not necessary for completeness.

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%, baseline 3. Description adds significant value: explains mutual exclusivity of file_path and content, when to use each, filename derivation, and defaults. This exceeds baseline.

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?

Description clearly states 'Upload a file as an attachment to a MantisBT issue' with specific verb and resource. It also distinguishes from sibling tools like list_issue_files and get_issue.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance: 'Use this tool to attach files such as logs, screenshots, or patches to an existing issue.' Also gives alternatives for listing and retrieving issues.

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/dpesch/mantisbt-mcp-server'

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