Skip to main content
Glama

create_issue_attachment

Upload a local file to a Gitea issue, securely storing it as an attachment with path restrictions and size limits.

Instructions

Upload a local file as an attachment on an issue by its index (multipart/form-data). file_path reads a LOCAL file from the machine running gitea-mcp — confirm with the user before uploading any file. The path is confined: it must resolve inside the server's working directory (or GITEA_UPLOAD_ROOT), pass a filename-extension allow-list, avoid sensitive locations (.git, .env*, keys), and stay under a 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)
indexYesIssue number
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
Install Server

TDQS

A4.8/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 behavioral burden and does so thoroughly. It discloses the local-file read behavior, mandatory user confirmation, path confinement rules, allow-list and sensitive-location restrictions, 50 MiB cap, return value with attachment id, and failure modes (404/413/422). This far exceeds basic expectations for a mutation/upload tool.

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 dense but every sentence earns its place: purpose, critical safety constraint, path restrictions, optional parameter behavior, return value, and failure risks. It is front-loaded with the core action and remains appropriately sized given the security-sensitive nature of the tool.

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?

Despite no output schema or annotations, the description covers the essential behaviors, constraints, and failure modes needed to invoke the tool safely. It explains what is returned, what can go wrong, and the security boundary imposed on file paths, making it complete for a real agent interaction.

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?

Although schema coverage is 100%, the description adds critical meaning beyond the schema. For file_path it explains local execution context, user confirmation, path confinement, allow-list, sensitive locations, and size cap; for name it clarifies the override behavior and default basename. This substantially helps the agent understand how to populate the parameters correctly.

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 opens with a specific verb and resource: 'Upload a local file as an attachment on an issue by its `index`'. It clearly identifies the multipart/form-data mechanism and distinguishes this from sibling attachment tools such as get_issue_attachment, edit_issue_attachment, and create_issue_comment_attachment by targeting issue attachments via an issue index.

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?

The description provides clear operational context, including that file_path must be a local file path from the machine running gitea-mcp and that user confirmation is required before uploading. It does not explicitly spell out when-not-to-use alternatives, but it gives strong situational guidance and risk warnings (disabled uploads, size limits), which is enough for an agent to decide when this tool is appropriate.

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