Skip to main content
Glama

Request File Upload URL

request_file_upload_url

Stage an upload for a PDF that is attached to the conversation, for clients that can execute shell commands but cannot pass the file to a tool directly. Returns a presigned upload URL plus a ready-made curlCommand that streams the file to it. Only use this tool if you are able to run that command; if you cannot, skip it and call upload_file directly with fileReference (a file reference supplied by the host application), url (a PDF reachable over HTTPS) or file (base64) plus fileName. After calling this tool, run the returned curlCommand to upload the file. CRITICAL: wait for it to complete and return HTTP 200 before calling upload_file — the staged entry holds no bytes until then, and upload_file will fail. The upload URL expires in 10 minutes. Once the upload has succeeded, call upload_file with the returned uploadId. ONE AT A TIME: only one staged upload can be pending per user. Finish the current file (curl, then upload_file) before requesting the next — do not request several upload URLs up front, not even for files that will be merged. A request made while another upload is pending is refused with an error that repeats the pending uploadId and, while its file has not arrived yet, its curl command so you can finish it; that refusal is expected, not a server fault. If the curl command fails with a network, DNS, or 'host not in allowlist' error, the client's code-execution sandbox is blocking outbound requests to this server — do not retry the same command. Report what blocked it, then either fall back to upload_file with file (base64), or, if the client lets the user allow outbound domains for code execution (the setting lives in the client's code-execution or sandbox preferences), tell the user how to allow this server's domain there and retry once they have done so.

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": "request_file_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNameYesFilename with extension (e.g. 'contract.pdf')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes far beyond the annotations: staged entry holds no bytes until curl completes, upload URL expires in 10 minutes, only one pending upload per user, refusals are expected not server faults, and network/DNS/allowlist failures are sandbox blocking that should not be retried. This is exactly the operational context annotations cannot convey.

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-loads the core purpose and the curlCommand follow-up in the first two sentences, then layers sequencing, expiry, and failure recovery. Dense but nearly every sentence prevents a concrete failure mode; the final allowlist paragraph is long but justified by the sandbox scenario it addresses.

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?

Covers the full lifecycle: request the URL, run curl, wait for HTTP 200, then call upload_file with the returned uploadId, including the concurrency limit and error handling. Nothing an agent needs to invoke and complete this two-step flow 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?

Only one parameter at 100% schema description coverage, so the schema already defines fileName and its extension requirement. The description adds context about the returned uploadId and curlCommand rather than enriching the input parameter itself, which is the expected baseline when the schema does the work.

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?

Opens with a specific verb+resource (stage an upload for a PDF attached to the conversation) and immediately names the situation it serves and the sibling it differs from (upload_file with fileReference/url/file). An agent can distinguish it from upload_file without opening either schema.

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 states when to use it (client can execute shell commands but cannot pass files directly), when to skip it, the three upload_file fallback parameter paths, and what to do after each outcome. The concurrency rule ('one at a time', do not pre-request URLs even for files that will be merged) is spelled out with the exact refusal behavior.

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