Skip to main content
Glama

files-create_upload_url

Generate a one-time upload link for attaching files to a note. Share the upload_url with the user so they can upload directly in their browser, which saves tokens by avoiding base64 encoding. Some clients also render this result as an inline drop-zone the user can drop files into; you cannot detect that, so always share the link either way. The link expires after 30 minutes and accepts up to max_files_per_upload files per request, each up to max_file_size_bytes; when remaining_bytes/remaining_files are present the whole batch must also fit inside those. Use files-check_upload to verify completion. Required: note_id (integer). Optional: description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_idYesNote ID to attach the file to (required)
descriptionNoOptional file description

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesPass to files-check_upload to confirm completion
note_idYesNote the files will attach to
expires_atYesISO 8601 expiry instant
note_titleYesTitle of that note
upload_urlYesOne-time upload URL to share with the user
remaining_bytesNoBytes left in the Free allowance; absent when only the per-file cap applies
remaining_filesNoFiles left in the Free allowance; absent when only the per-file cap applies
expires_in_secondsYesSeconds until the link expires, measured server-side
max_file_size_bytesYesLargest single file this upload will accept
max_files_per_uploadYesMost files one upload request may carry

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "The one-time upload link and the limits it will be judged against.",
      +  "properties": {
      +    "expires_at": {
      +      "description": "ISO 8601 expiry instant",
      +      "type": "string"
      +    },
      +    "expires_in_seconds": {
      +      "description": "Seconds until the link expires, measured server-side",
      +      "type": "integer"
      +    },
      +    "max_file_size_bytes": {
      +      "description": "Largest single file this upload will accept",
      +      "type": "integer"
      +    },
      +    "max_files_per_upload": {
      +      "description": "Most files one upload request may carry",
      +      "type": "integer"
      +    },
      +    "note_id": {
      +      "description": "Note the files will attach to",
      +      "type": "integer"
      +    },
      +    "note_title": {
      +      "description": "Title of that note",
      +      "type": "string"
      +    },
      +    "remaining_bytes": {
      +      "description": "Bytes left in the Free allowance; absent when only the per-file cap applies",
      +      "type": "integer"
      +    },
      +    "remaining_files": {
      +      "description": "Files left in the Free allowance; absent when only the per-file cap applies",
      +      "type": "integer"
      +    },
      +    "token": {
      +      "description": "Pass to files-check_upload to confirm completion",
      +      "type": "string"
      +    },
      +    "upload_url": {
      +      "description": "One-time upload URL to share with the user",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "upload_url",
      +    "token",
      +    "expires_at",
      +    "expires_in_seconds",
      +    "note_id",
      +    "note_title",
      +    "max_file_size_bytes",
      +    "max_files_per_upload"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / note_id / description
      Previous value: -"Note ID to attach the file to"New value: +"Note ID to attach the file to (required)"
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations are sparse (all false hints), so the description carries the full burden and delivers extensively: 30-minute expiry, per-request file counts, per-file size caps, the batch constraint when remaining_bytes/remaining_files are present, and the nuance that some clients render a drop-zone the agent cannot detect. This is precisely the kind of behavioral context an agent needs and the structured fields do not provide.

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?

Content is dense and front-loaded: purpose, token rationale, expiry, limits, and follow-up verification all earn their place. The only waste is the final 'Required: note_id (integer). Optional: description.' line, which duplicates the input schema instead of adding value. Trimming that would make it a 5.

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?

Given an output schema exists (so return values need no explanation), an output-type proof is a simple tool with 2 parameters is essentially complete: it covers purpose, key operational behavior (expiry/limits), client rendering nuance, safety (expiry), and the verification handoff. Nothing an agent needs to invoke and use the result correctly is left out.

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 parameters already have clear descriptions in the schema. The description only restates them ('Required: note_id (integer). Optional: description.'), adding no new semantics such as value ranges, formats, or why description matters. Baseline 3 is appropriate when the schema does the heavy lifting.

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+context: "Generate a one-time upload link for attaching files to a note." This cleanly separates it from its files-* siblings (files-attach, files-attach_from_url, files-get_download_url, files-remove) since it is the only one producing a client-side upload URL. An agent knows exactly what this tool is for without opening any sibling schema.

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?

Gives clear when-to-use context: share the link so the user uploads in their browser, explicitly because it 'saves tokens by avoiding base64 encoding,' and names the follow-up tool files-check_upload for verification. It also instructs that the link must always be shared because drop-zone rendering is undetectable. It doesn't explicitly name the alternative (e.g., files-attach_from_url) and when to choose it over this tool, which keeps it just shy of a 5.

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.