Skip to main content
Glama

Upload File Attachment

upload_file

Attach files such as logs, screenshots, or patches to a MantisBT issue without modifying other fields. Accepts a local file path or base64-encoded content.

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.

Two input modes — exactly one must be provided:

  • file_path: absolute path to a local file; filename is derived from the path automatically

  • content: Base64-encoded file content; 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
issue_idYesNumeric issue ID
file_pathNoAbsolute path to the local file to upload (mutually exclusive with content)
contentNoBase64-encoded file content (mutually exclusive with file_path)
filenameNoFile name for the attachment (required when using content; overrides the derived name when using file_path)
content_typeNoMIME type of the file, e.g. "image/png" (default: "application/octet-stream")
descriptionNoOptional description for the attachment
Behavior5/5

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

The description adds behavioral context beyond annotations: it states the file is added without modifying issue fields/status, and returns created metadata. Consistent with non-destructive hint.

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-organized and concise, front-loaded with purpose, and uses structured paragraphs to convey usage modes and defaults without redundancy.

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 6-parameter tool with no output schema, the description covers all parameter semantics, return value, usage modes, and references to sibling tools, making it fully self-contained.

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 description enriches the already-100% schema coverage by explaining the mutual exclusivity of file_path and content, the dependency of filename on content mode, and default content_type.

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 the tool uploads a file as an attachment to a MantisBT issue without modifying other fields. It distinguishes itself 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?

It explains two mutually exclusive input modes (file_path vs content) and when to use each. It also provides when-not-to-use guidance by referencing alternative tools for listing and retrieving.

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