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.

Input Schema

TableJSON 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

TableJSON 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. 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."
  2. 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"
      +]
  3. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive. The description adds genuinely valuable behavior beyond that: a hard restriction on built-in entities, file-type limits per entity type, and the recommended call ordering. It stops short of saying what happens on failure or whether existing references are replaced.

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 rule (file-type scope, BRAND roles, built-in restriction, recommended ordering), with the core action front-loaded. No filler or repetition.

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?

For a 5-param mutation tool with full schema coverage, annotations, and an output schema, the description covers everything an agent needs: valid file types, role choices, hard restrictions, and workflow ordering. Nothing material is missing.

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 adds meaning beyond the schema by tying isDefault to the post-create_entity workflow and by explaining role values in the context of what they affect (overlay logo vs. visual generation reference).

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+resource (attach an uploaded file as a reference on an entity) and immediately scopes it: images for all entity types, PDF/PowerPoint only for slideshow themes. It is clearly distinguished from the sibling remove_entity_reference and from create_entity.

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?

Gives explicit when-to-use rules and exclusions: 'Built-in entities cannot have references added,' which role to set for a BRAND, and the ordering instruction to call this right after create_entity with isDefault: true for new PRODUCT/ACTOR entities. Alternatives and constraints are both named.

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.