Skip to main content
Glama

files-attach_from_url

Fetch a file from a public URL or a native ChatGPT file reference and attach it to one of your personal notes (personal notes only; for team or shared notes use files-create_upload_url). Required: note_id and either url or file. In ChatGPT, prefer file for an available file reference, including generated or processed files when ChatGPT can provide one. ChatGPT supplies the temporary download URL and file ID; never invent them, pass a local file path, or encode the bytes as base64. If both sources are supplied, a non-empty file reference takes precedence; an all-blank file placeholder is ignored. Follows up to three redirects. Optional: filename (overrides reference metadata, otherwise derived from URL), content_type (overrides reference metadata, otherwise from HTTP response), description. When no reference or public URL is available, use files-create_upload_url.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic URL to fetch; optional when file is supplied
fileNoNative file reference supplied by ChatGPT; optional when url is supplied
note_idYesPersonal note ID to attach the file to
filenameNoOverride filename; otherwise reference metadata or URL path
descriptionNoOptional file description
content_typeNoOverride MIME type; otherwise reference metadata or HTTP response

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / description
      Previous value: -"Fetch a file from a URL and attach it to a note."New value: +"Attach a file from a public URL or a ChatGPT file reference. Supply url or file."
    • changedInput schema / properties / content_type / description
      Previous value: -"Override MIME type (default: from HTTP response)"New value: +"Override MIME type; otherwise reference metadata or HTTP response"
    • addedInput schema / properties / file
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Native file reference supplied by ChatGPT; optional when url is supplied",
      +  "properties": {
      +    "download_url": {
      +      "description": "Temporary HTTPS download URL supplied by ChatGPT",
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "description": "File ID supplied by ChatGPT",
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "description": "Original filename, when available",
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "description": "File MIME type, when available",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / filename / description
      Previous value: -"Override filename (default: derived from URL)"New value: +"Override filename; otherwise reference metadata or URL path"
    • changedInput schema / properties / note_id / description
      Previous value: -"Note ID (required)"New value: +"Personal note ID to attach the file to"
    • changedInput schema / properties / url / description
      Previous value: -"URL to fetch the file from (required)"New value: +"Public URL to fetch; optional when file is supplied"
    • changedInput schema / required
      Previous value: -[
      -  "note_id",
      -  "url"
      -]New value: +[
      +  "note_id"
      +]
  2. Changed4 schema fields changed
    • removedInput schema / properties / id
      Removed value: -{
      -  "description": "Note ID",
      -  "type": "integer"
      -}
    • addedInput schema / properties / note_id
      Added value: +{
      +  "description": "Note ID (required)",
      +  "type": "integer"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"URL to fetch the file from"New value: +"URL to fetch the file from (required)"
    • changedInput schema / required
      Previous value: -[
      -  "id",
      -  "url"
      -]New value: +[
      +  "note_id",
      +  "url"
      +]
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover openWorldHint=true, idempotentHint=false and destructiveHint=false, but the description adds behavior they cannot express: follows up to three redirects, the url-vs-file precedence rule, blank-placeholder handling, and hard prohibitions (never invent URLs, pass local paths, or base64-encode bytes). For a non-idempotent open-world fetch, these are exactly the operational facts an agent needs.

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?

Dense but appropriately front-loaded: source and scope come first, then constraints, then optional overrides, then the fallback. Every sentence carries information, though the 'never invent them / local path / base64' sentence and the ChatGPT-supplied-URL sentence overlap slightly and could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a 6-parameter tool including a nested file object and no output schema, the description covers sources, precedence, redirects, overrides, and the fallback tool well. The one gap is what the call returns (attachment identifier or file record), but that is a minor omission given how thoroughly the invocation path is specified.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description goes beyond the per-field text by defining resolution order ('If both sources are supplied, a non-empty file reference takes precedence; an all-blank file placeholder is ignored') and default derivation for filename and content_type from reference metadata or the HTTP response. Only the note_id parameter gets no added semantics beyond the schema.

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 precise verb and resource ('Fetch a file from a public URL or a native ChatGPT file reference and attach it to one of your personal notes') and immediately bounds scope to personal notes, naming the sibling (files-create_upload_url) that handles team/shared notes. An agent can distinguish this from files-attach and files-create_upload_url without opening a 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?

Explicit when-to-use (public URL or ChatGPT file reference, personal notes), when-not (team or shared notes → files-create_upload_url), a preference rule ('in ChatGPT, prefer file'), and a fallback ('When no reference or public URL is available, use files-create_upload_url'). Alternatives and selection conditions are fully specified.

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.