Skip to main content
Glama

Get an upload URL

threadpacket_upload_url

Prepare an attachment slot and return a single-use upload URL, valid 15 minutes, for a file on the user's machine (for example from Codex or a terminal). Upload the file's raw bytes with HTTP PUT to upload_url, sending the returned headers, then pass the attachment_id to threadpacket_send. First check that upload_url starts with https://threadpacket.com/v1/uploads/. From a shell, use this fixed command with the file's full path, the content type and the URL each in single quotes: curl -fsS -X PUT --upload-file '<full path>' -H 'content-type: <type>' '<upload_url>' (macOS, Linux; write a ' inside quotes as '''), or $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -UseBasicParsing -Method Put -InFile '<full path>' -ContentType '<type>' -Uri '<upload_url>' (Windows PowerShell; double each ' ‘ ’ ‚ ‛ inside quotes). Never send file contents through this tool. In Claude, if the upload fails with "CONNECT tunnel failed, response 403", Claude blocked it before it reached this server: ask the user to add threadpacket.com to Claude's allowed domains in Settings > Capabilities (on Team and Enterprise plans an owner does this in Admin settings), then upload again. If they cannot, they upload the file at https://threadpacket.com/packets and you attach it by name with attachment_names.

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": {
      "filename": "<filename>"
    },
    "name": "threadpacket_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesThe file's name, without folders, as it is on disk.
mime_typeNoThe file's type if known, for example application/pdf or application/vnd.openxmlformats-officedocument.wordprocessingml.document. Any file type is accepted.

Output Schema

NameRequiredDescriptionDefault
methodYes
headersYes
max_bytesYes
expires_atYes
upload_urlYes
attachment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only say this is a non-readonly, non-idempotent, non-destructive, closed-world call; the description carries the real behavioral burden by disclosing the 15-minute single-use TTL, that the payload must be raw bytes PUT to an external-looking URL, and what state is being created (an attachment slot). It also documents the specific failure mode 'CONNECT tunnel failed, response 403' and the domain allowlist remedy, which annotations cannot express. Minor deduction because the description never says what happens if the URL expires or the slot is left unused.

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?

Core intent is front-loaded in the first sentence, followed by the required action and then troubleshooting. It is long, and the parenthetical quoting-escape rules (writing a quote as '\'' or doubling curly quotes) are heavy prose, but nearly every sentence maps to an action an agent must actually take, so the bulk is earned rather than padding.

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?

An output schema exists, so the description need not explain the returned fields, and it still covers the full lifecycle: slot creation, byte transfer, follow-up tool, pre-flight URL validation, platform-specific commands, and an alternate path when the upload is blocked. Nothing an agent needs to complete the two-step upload is missing.

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 coverage is 100% and both properties (filename, mime_type) are already documented in the schema, including the note that any file type is accepted. The description's mention of 'the file's full path' and 'the content type' in the shell commands adds only a little operational framing beyond the schema, so the baseline 3 applies.

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 concrete verb and resource ('Prepare an attachment slot and return a single-use upload URL') plus scope details (15-minute validity, file on the user's machine). It also positions itself relative to the sibling threadpacket_send, which consumes the resulting attachment_id, so an agent can place it in a workflow without inspecting other schemas.

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?

Gives explicit sequencing (get URL, PUT the bytes, then pass attachment_id to threadpacket_send), a pre-flight validation step (verify the URL starts with https://threadpacket.com/v1/uploads/), a hard exclusion ('Never send file contents through this tool'), and a fallback path (browser upload plus attachment_names) when the network block cannot be resolved.

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.