upload_file

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 t...

Server MantisBT MCP Server @dpesch/mantisbt-mcp-server
Category Write
Risk class Medium
Parameters 61 required

What upload_file does on MantisBT MCP Server

AI agents use upload_file to create or update resources in MantisBT MCP Server — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your MantisBT MCP Server environment.

ParameterTypeRequiredDescription
content string Fallback: Base64-encoded file content — only use when file_path is not available (mutually exclusive with file_path)
filename string File name for the attachment (required when using content; overrides the derived name when using file_path)
issue_id integer Yes Numeric issue ID
file_path string Preferred: absolute path to the local file to upload — use this whenever the file exists on disk (mutually exclusive with content)
description string Optional description for the attachment
content_type string MIME type of the file, e.g. "image/png" (default: "application/octet-stream")

Parameters from the server's own tool schema.

Why upload_file needs a policy

This tool creates new data (file attachments) within MantisBT issues but does not irreversibly delete data nor execute arbitrary code. The operation is reversible and represents data creation/modification rather than destructive action.

From the tool's definition Tool description states it 'Upload a file as an attachment to a MantisBT issue' and 'Adds the file to the issue'. The operation creates a new attachment resource, which is reversible (can be deleted via delete operations on the server).

Risk signalsAccepts file system path (file_path) · Accepts raw HTML/template content (content)

Questions about upload_file

What does the upload_file tool do? +

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. It is categorised as a Write tool in the MantisBT MCP Server MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.

What parameters does upload_file accept? +

upload_file accepts 6 parameters: content, filename, issue_id, file_path, description, content_type. Required: issue_id. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on upload_file? +

Register the MantisBT MCP Server MCP server in PolicyLayer and add a rule for upload_file: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches MantisBT MCP Server. Nothing to install.

What risk level is upload_file? +

upload_file is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit upload_file? +

Yes. Add a rate_limit block to the upload_file rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block upload_file completely? +

Set action: deny in the PolicyLayer policy for upload_file. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides upload_file? +

upload_file is provided by the MantisBT MCP Server MCP server (@dpesch/mantisbt-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.