Skip to main content
Glama

Add entity reference

add_entity_reference

Attach an uploaded file (vg_file_...) as a reference on an entity. Images work for every entity type. Slideshow themes may also attach a PDF or PowerPoint. For a BRAND, set role BRAND_LOGO for its overlay logo or BRAND_STYLE_GUIDE for its visual generation reference. Built-in entities cannot have references added. For new PRODUCT/ACTOR entities, call this right after create_entity with isDefault: true so the entity has a usable thumbnail and generation reference.

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": {
      "entityId": "<entityId>",
      "fileId": "<fileId>"
    },
    "name": "add_entity_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleNoPurpose of the attached file. Omit for a general reference. On a BRAND, BRAND_LOGO is its overlay logo and BRAND_STYLE_GUIDE is its visual generation reference.
fileIdYesImage file id (vg_file_...) to attach as a reference. Upload first via upload_file / create_file_upload / open_uploader.
entityIdYesSaved reference entity to use. Obtain entityId from list_entities or create_entity.
isDefaultNoWhen true, make this the primary reference (thumbnail). Defaults to false.
descriptionNoOptional description of this reference image.

Output Schema

NameRequiredDescriptionDefault
nameYesDisplay name.
entityIdYesEntity id (vg_enti_...).
createdAtYesUnix created-at timestamp.
isBuiltInNoTrue for VideoGen catalog entities that cannot be modified.
updatedAtYesUnix updated-at timestamp.
entityTypeYesACTOR, PRODUCT, VISUAL_STYLE, SLIDESHOW_THEME, BRAND, LOCATION, or PROP.
referencesYesAttached reference images.
actorConfigNoVoice/avatar summary for ACTOR entities; null for other types.
brandConfigNoBrand guidance for BRAND entities; null for other types.
descriptionYesDescription (empty when unset).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / actorConfig / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "properties": {
      -      "hasAvatarPresenter": {
      -        "description": "True when the actor has an image reference usable for avatar generation.",
      -        "type": "boolean"
      -      },
      -      "hasVoice": {
      -        "description": "True when the actor has a configured voice.",
      -        "type": "boolean"
      -      },
      -      "voiceDisplayName": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Configured voice display name when set."
      -      }
      -    },
      -    "required": [
      -      "hasVoice",
      -      "hasAvatarPresenter"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "hasAvatarPresenter": {
      +        "description": "True when the actor has an image reference usable for avatar generation.",
      +        "type": "boolean"
      +      },
      +      "hasVoice": {
      +        "description": "True when the actor has a configured voice.",
      +        "type": "boolean"
      +      },
      +      "voiceDisplayName": {
      +        "description": "Configured voice display name when set.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "hasVoice",
      +      "hasAvatarPresenter"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / entityId / description
      Previous value: -"Entity id (vg_enti_...)."New value: +"Saved reference entity to use. Obtain entityId from list_entities or create_entity."
    • changedInput schema / properties / role / description
      Previous value: -"What the file is used for. Defaults to REFERENCE. On a BRAND, BRAND_LOGO is its overlay logo and BRAND_STYLE_GUIDE is its visual generation reference."New value: +"Purpose of the attached file. Omit for a general reference. On a BRAND, BRAND_LOGO is its overlay logo and BRAND_STYLE_GUIDE is its visual generation reference."
  3. Changed7 schema fields changed
    • addedInput schema / properties / role
      Added value: +{
      +  "description": "What the file is used for. Defaults to REFERENCE. On a BRAND, BRAND_LOGO is its overlay logo and BRAND_STYLE_GUIDE is its visual generation reference.",
      +  "enum": [
      +    "REFERENCE",
      +    "BRAND_LOGO",
      +    "BRAND_STYLE_GUIDE"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / description
      Previous value: -"A reusable actor, product, visual style, or slideshow theme entity."New value: +"A reusable actor, product, visual style, slideshow theme, brand, location, or prop entity."
    • addedOutput schema / properties / brandConfig
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "colors": {
      +          "description": "Color guidance.",
      +          "type": "string"
      +        },
      +        "fonts": {
      +          "description": "Font guidance.",
      +          "type": "string"
      +        },
      +        "writingStyle": {
      +          "description": "Voice and tone for copy.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "fonts",
      +        "colors",
      +        "writingStyle"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Brand guidance for BRAND entities; null for other types."
      +}
    • changedOutput schema / properties / entityType / description
      Previous value: -"ACTOR, PRODUCT, VISUAL_STYLE, or SLIDESHOW_THEME."New value: +"ACTOR, PRODUCT, VISUAL_STYLE, SLIDESHOW_THEME, BRAND, LOCATION, or PROP."
    • changedOutput schema / properties / entityType / enum
      Previous value: -[
      -  "ACTOR",
      -  "PRODUCT",
      -  "VISUAL_STYLE",
      -  "SLIDESHOW_THEME"
      -]New value: +[
      +  "ACTOR",
      +  "PRODUCT",
      +  "VISUAL_STYLE",
      +  "SLIDESHOW_THEME",
      +  "BRAND",
      +  "LOCATION",
      +  "PROP"
      +]
    • addedOutput schema / properties / references / items / properties / role
      Added value: +{
      +  "description": "REFERENCE for generation and thumbnails; BRAND_LOGO / BRAND_STYLE_GUIDE for a brand's logo and style guide.",
      +  "enum": [
      +    "REFERENCE",
      +    "BRAND_LOGO",
      +    "BRAND_STYLE_GUIDE"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / references / items / required
      Previous value: -[
      -  "fileId",
      -  "description",
      -  "isDefault"
      -]New value: +[
      +  "fileId",
      +  "description",
      +  "role",
      +  "isDefault"
      +]
  4. First observed

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already declare this is a non-read-only, non-idempotent, non-destructive, closed-world mutation, and the description stays consistent while adding real behavioral context: per-entity-type file restrictions, the built-in-entity exclusion, and the expected call ordering after create_entity. It stops short of saying what happens on duplicate attachments or how errors surface, which keeps it from a 5.

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?

Four tight sentences, each carrying a distinct constraint: what is attached, which file types are allowed, what the BRAND roles mean, and the create_entity follow-up pattern. The exclusions and the primary workflow are front-loaded with no redundant restatement of the tool name or title.

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 an output schema present, return values need no explanation, and the annotations cover the safety profile, so the description's remaining job is constraints and sequencing, which it does well. It could go further on duplicate/idempotency behavior and failure modes for an explicitly non-idempotent mutation, but an agent has enough to invoke it correctly.

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 description coverage is 100%, so role, fileId, entityId, isDefault, and description are already documented in structured form, establishing a baseline of 3. The description reinforces the BRAND role meanings (overlay logo vs. visual generation reference) and gives an actionable condition for isDefault, but adds little else about parameter 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?

The definition opens with a specific verb and resource: "Attach an uploaded file (vg_file_...) as a reference on an entity." It scopes the operation by entity type (images everywhere, PDF/PPT on slideshow themes) and names the concrete roles (BRAND_LOGO, BRAND_STYLE_GUIDE), so an agent can tell it apart from remove_entity_reference, upload_file, and create_entity without opening any 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?

Both the when and when-not are explicit: built-in entities cannot receive references, and for new PRODUCT/ACTOR entities this should be called immediately after create_entity with isDefault: true. The file-type matrix (images for every entity type, PDF/PowerPoint only for slideshow themes) further constrains when the call is valid.

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.