Skip to main content
Glama

Upload File Attachment

upload_file

Attach files to MantisBT issues via local path or Base64 content. Adds logs, screenshots, or patches without modifying the issue.

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. Note: file_path reads from the server's filesystem and is disabled over the HTTP transport unless MANTIS_UPLOAD_DIR is configured — HTTP clients should use content instead.

  • 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")
Behavior4/5

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

Annotations indicate this is a mutation (readOnlyHint=false) and non-idempotent. The description adds context that the operation does not modify issue fields/status, and explains how file_path is handled server-side. It does not mention error handling or size limits, but overall provides good behavioral context beyond 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.

Conciseness5/5

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

The description is well-structured with clear sections: main purpose, two input modes with detailed explanations, optional parameters, and sibling tool references. It is concise yet comprehensive, with no redundant sentences.

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 the 6 parameters, 1 required, no output schema, and the sibling tools, the description covers purpose, parameter usage alternatives, and behavioral notes. It mentions the return value as 'attachment metadata' but does not detail its structure; however, this is acceptable without an output schema. Prerequisites like issue existence are implied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema descriptions cover all 6 parameters at 100%. The description goes beyond by explaining the mutual exclusivity of file_path and content, the automatic filename derivation, the default content_type, and the optional description. This adds meaningful guidance for correct usage.

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 clearly states that the tool uploads a file as an attachment to a MantisBT issue without modifying issue fields or status. The verb 'upload' and resource 'file attachment to issue' are explicit, and it distinguishes from siblings 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?

The description provides detailed guidance on when to use file_path vs content, including the preference for file_path and the requirement to use content when the file is in memory. It also mentions the transport limitation for file_path over HTTP and points to alternative tools for listing or 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