Skip to main content
Glama

Save Reference Images

save_reference_file_from_chat_file

Batch save reference images from chat attachments into the Files library. Keep file metadata in files[] and pass top-level image_file_1, image_file_2, etc. in the same order. No base64, no local paths. Use for mood boards, backgrounds, and other reference images that are not garments or avatars.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoReference file metadata in the same order as image_file_1, image_file_2, etc. No base64.
file_nameNoSingle recovered display name
image_urlNoSingle resolved download URL used by automatic opaque-file recovery.
mime_typeNoSingle recovered MIME/content type, e.g. image/png
image_file_1NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.
image_file_2NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.
image_file_3NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.
image_file_4NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.
image_file_5NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.
image_file_6NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.
image_file_7NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.
image_file_8NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.
image_file_9NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.
image_file_10NoHost-provided uploaded file reference for the matching item index when it has no image_url. Use the file object supplied by the host, not a bare file_... ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed32 schema fields changed
    • removedInput schema / $defs / MCPFileReference
      Removed value: -{
      -  "additionalProperties": true,
      -  "description": "Host-provided MCP file reference for user-uploaded images.",
      -  "properties": {
      -    "content_type": {
      -      "default": null,
      -      "description": "File content type, e.g. image/png",
      -      "type": "string"
      -    },
      -    "download_url": {
      -      "default": null,
      -      "description": "Temporary host-authorized download URL for this file",
      -      "type": "string"
      -    },
      -    "file_id": {
      -      "default": null,
      -      "description": "Host file ID",
      -      "type": "string"
      -    },
      -    "file_name": {
      -      "default": null,
      -      "description": "Original uploaded file name",
      -      "type": "string"
      -    },
      -    "mime_type": {
      -      "default": null,
      -      "description": "File MIME type, e.g. image/png",
      -      "type": "string"
      -    },
      -    "name": {
      -      "default": null,
      -      "description": "Original uploaded file name when the host uses name",
      -      "type": "string"
      -    },
      -    "uri": {
      -      "default": null,
      -      "description": "Host file URI when available",
      -      "type": "string"
      -    },
      -    "url": {
      -      "default": null,
      -      "description": "Temporary/public file URL when the host exposes one",
      -      "type": "string"
      -    }
      -  },
      -  "type": "object"
      -}
    • addedInput schema / $defs / OpenAIFile
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "download_url": {
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / image_file_1 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_1 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_1 / default
      Removed value: -null
    • addedInput schema / properties / image_file_10 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_10 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_10 / default
      Removed value: -null
    • addedInput schema / properties / image_file_2 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_2 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_2 / default
      Removed value: -null
    • addedInput schema / properties / image_file_3 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_3 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_3 / default
      Removed value: -null
    • addedInput schema / properties / image_file_4 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_4 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_4 / default
      Removed value: -null
    • addedInput schema / properties / image_file_5 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_5 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_5 / default
      Removed value: -null
    • addedInput schema / properties / image_file_6 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_6 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_6 / default
      Removed value: -null
    • addedInput schema / properties / image_file_7 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_7 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_7 / default
      Removed value: -null
    • addedInput schema / properties / image_file_8 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_8 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_8 / default
      Removed value: -null
    • addedInput schema / properties / image_file_9 / $ref
      Added value: +"#/$defs/OpenAIFile"
    • removedInput schema / properties / image_file_9 / anyOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/MCPFileReference"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / image_file_9 / default
      Removed value: -null
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the description doesn't need to restate those. The description adds valuable behavioral context: the batch nature of the operation, the ordering requirement between files[] and image_file_N, and the constraint that inputs must be chat file references (no base64, no local paths). It also clarifies the destination ('Files library'). This goes beyond the annotations without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with zero waste. The core action and destination are front-loaded, followed by the critical ordering instruction, then the exclusion clause. Every sentence earns its place and the most important operational detail (ordering) is placed early.

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?

For a 14-parameter batch upload tool with no output schema, the description covers the essential operational semantics: what to pass, how to order it, what not to pass, and when to use it. The only minor gap is that it doesn't describe the return value or success/failure behavior, but with no output schema and the annotations covering safety, this is a minor omission. The description is complete enough for an agent to invoke the tool correctly.

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 schema already documents all 14 parameters. The description adds critical cross-parameter semantics: the ordering relationship between files[] and image_file_1..10, and the rule that image_file_N should be used when the matching item has no image_url. It also clarifies that files[] holds metadata while image_file_N holds the actual file references. This is meaningful value 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?

The description states a specific verb ('Batch save'), a clear resource ('reference images from chat attachments into the Files library'), and explicitly distinguishes the tool from related upload tools by excluding garments and avatars. It also names the sibling tools it is not (upload_garment_from_chat_file, upload_avatar_from_chat_file) implicitly through the exclusion clause.

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?

The description explicitly says when to use this tool ('Use for mood boards, backgrounds, and other reference images') and when not to use it ('not garments or avatars'). It also provides critical usage instructions: keep metadata in files[] and pass top-level image_file_1, image_file_2, etc. in the same order, and warns against base64 or local paths. This is explicit routing guidance.

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