Skip to main content
Glama

create_issue_comment_attachment

Attach a local file to a specific issue comment by providing its comment ID and file path, with optional custom name.

Instructions

Upload a local file as an attachment on one issue COMMENT by its comment_id (get the id from list_comments; multipart/form-data, same shape and rules as create_issue_attachment). file_path reads a LOCAL file from the machine running gitea-mcp — confirm with the user before uploading any file. The path is confined the same way (upload root, extension allow-list, sensitive locations, 50 MiB cap). Optional name overrides the stored filename (defaults to the file's basename). Returns the created attachment including its id. RISK: instances can disable attachments (404) and cap upload size (oversized files fail 413/422).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoAttachment name stored on the server (defaults to the file's basename)
repoNoRepository name (defaults to GITEA_DEFAULT_REPO)
ownerNoRepository owner (defaults to GITEA_DEFAULT_OWNER)
file_pathYesLOCAL path (on the machine running gitea-mcp) to the file to upload — confirm with the user first. Must resolve inside the upload root (server working directory or GITEA_UPLOAD_ROOT), pass the extension allow-list, avoid sensitive locations, and stay under the size cap
comment_idYesComment ID
Install Server

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it succeeds: it discloses interaction with the local machine, user confirmation requirement, upload-path confinement, extension allow-list, sensitive-location avoidance, 50 MiB cap, default filename behavior, return value, and failure modes (404/413/422). This is unusually transparent for a tool of this type.

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 description is long but information-dense, touching on target, ID source, upload rules, local file safety, overrides, return value, and failure cases. Every sentence earns its place, though a few points (`file_path` reads a local file, `same shape and rules as create_issue_attachment`) could be more compact without losing value.

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?

With no output schema, the description provides the needed return information (“Returns the created attachment including its `id`”), and it also covers the important operational constraints and common risk scenarios. The combination of purpose, warnings, and failure modes makes the tool fully predictable without additional documentation.

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%, and the description adds useful semantics beyond it: `comment_id` should come from `list_comments`, `file_path` is a LOCAL path requiring user confirmation, `name` is optional and defaults to the basename, and the file rules mirror `create_issue_attachment`. Some repetition of schema text exists, but the added constraints are genuinely helpful.

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 states the exact verb/resource (“Upload a local file as an attachment on one issue COMMENT”) and identifies the required `comment_id`, clearly distinguishing it from `create_issue_attachment`, which targets issue attachments instead of comment attachments. The reference to `list_comments` and `create_issue_attachment` further clarifies the operation's scope.

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?

It tells the agent where to get the ID (“get the id from list_comments”) and ties the request format and constraints to `create_issue_attachment`, giving concrete context for use. It lacks an explicit “use X instead when targeting an issue” exclusion, but the naming and scope are clear enough.

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

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/amonstack/gitea_mcp'

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