Skip to main content
Glama
Redmine MCP Server

Redmine MCP Server

by popper2710

upload_attachment

Upload a file to Redmine and get a token to attach it to an issue using create_issue or update_issue, enabling attachments in issue workflows.

Instructions

Upload a file to Redmine and get an upload token.

The returned token can be used to attach the file to an issue
using create_issue() or update_issue() with the 'uploads' parameter.

Args:
    file_path: Absolute path to the file to upload
    filename: Optional filename to use in Redmine (defaults to the file's basename)

Returns:
    Dictionary containing:
    - token: Upload token to use when attaching to an issue
    - filename: The filename that will be used

Example:
    # Step 1: Upload the file
    result = upload_attachment("/path/to/report.pdf")
    token = result["token"]

    # Step 2: Attach to an issue
    update_issue(
        issue_id=123,
        uploads=[{
            "token": token,
            "filename": "report.pdf",
            "content_type": "application/pdf",
            "description": "Monthly report"
        }]
    )

Note:
    The caller is responsible for validating file_path to prevent
    unauthorized file access.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_path": "<file_path>"
    },
    "name": "upload_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameNo
file_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden: it discloses the token-return contract and adds a valuable security note that the caller must validate file_path. However, it says nothing about upload size limits, whether tokens expire, permission/auth requirements, or what errors surface for a bad path, which are significant gaps for a filesystem-touching tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

The core purpose and the token workflow are front-loaded, and the Args/Returns/Example structure is easy to scan. The Returns section and the example are somewhat redundant in restating the token, but no sentence is genuinely wasted.

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?

No output schema exists, but the description documents the return dictionary (token, filename), so an agent knows what to expect, and both parameters are explained. What's missing is operational context — size limits, upload lifetime, and error behavior — which matters for a tool that reads local files and creates a server-side resource.

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 0% (no per-parameter descriptions), so the description must compensate and largely does: file_path is specified as an absolute path, and filename is described as optional with a stated default of the file's basename. That is meaning beyond the bare type declarations, though constraints on allowed characters or path roots are absent.

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?

States a specific verb+resource ('Upload a file to Redmine') plus the key artifact produced (an upload token), and the two-step token flow makes clear it is not the attach operation itself — separating it from sibling tools like update_attachment and download_attachment.

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?

Explicitly says the returned token is consumed by create_issue() or update_issue() via the 'uploads' parameter, and the worked example spells out the ordering. It lacks any negative guidance (e.g. when to use update_attachment vs re-uploading), so it falls short of a full 5.

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