Skip to main content
Glama

Get the file upload endpoint

prepare_attachment_upload
Read-onlyIdempotent

Get the raw upload endpoint for an issue's file attachments. PREFER save_attachment_file — it attaches a file in one call and needs no credential from you. Use this one only if you are a human or a script that already holds an agent API key: it returns { uploadUrl }, and you then POST the raw bytes with that key as a Bearer header (add &filename= for the download name and optional &title=). Example: curl -X POST "<uploadUrl>&filename=shot.png" -H "Authorization: Bearer <yourApiKey>" --data-binary @shot.png → {"id":"...","url":"..."}. The key must be an agent API key (the kind retasc writes to its keystore bindings), NOT a CLI session token from a user login. If you are a model: you do not have that key by design, so do not read config files hunting for one — call save_attachment_file. For a plain link rather than a file, use save_attachment.

Input Schema

NameRequiredDescriptionDefault
issueYesIssue ID, e.g. RTSC-12

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and the description is consistent with that (it only mints a URL; the caller does the POST). The description adds real behavioral context — the auth requirement (agent API key, not a CLI session token), the returned uploadUrl, query params for filename/title, and the response shape. But part of the credit is for repeating the auth/flow that the tool's own name and annotations partly imply, so it lands above baseline but not at the top.

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?

Front-loaded with the routing recommendation ('PREFER save_attachment_file'), which is the most decision-relevant info. The curl example and the 'if you are a model' note are useful but add length; still, most sentences earn their place via concrete flow guidance.

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 supplies the return shape ({uploadUrl} and the example POST response with id/url) and the full invocation flow. Combined with the routing alternatives, an agent has everything needed to decide whether and how to call it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single `issue` parameter is fully documented in the schema, so the baseline is 3. The description mentions 'an issue's file attachments' but adds no format or constraint details beyond what the schema already provides.

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 and resource ('Get the raw upload endpoint for an issue's file attachments') and immediately distinguishes itself from sibling tools save_attachment_file and save_attachment. An agent can tell exactly what this returns and how it differs from the one-call alternatives.

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?

Explicitly says PREFER save_attachment_file, gives the condition for using this tool instead (human or script holding an agent API key), and routes plain-link use cases to save_attachment. When-to-use, when-not-to-use, and alternatives are all stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources