Skip to main content
Glama

Add entity reference

add_entity_reference

Attach uploaded images or PDF/PowerPoint files as references on a VideoGen entity, and set one as the default thumbnail. Use after creating PRODUCT or ACTOR entities to assign a generation reference.

Instructions

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. 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
fileIdYesImage file id (vg_file_...) to attach as a reference. Upload first via upload_file / create_file_upload / open_uploader.
entityIdYesEntity id (vg_enti_...).
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, or SLIDESHOW_THEME.
referencesYesAttached reference images.
actorConfigNoVoice/avatar summary for ACTOR entities; null for other types.
descriptionYesDescription (empty when unset).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.1

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only declare the generic mutation profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false). The description adds real behavioral context beyond that: entity-type restrictions, accepted file formats, and the ordering dependency on create_entity. It stops short of disclosing idempotency, overwrite behavior, or failure modes, so it is strong but not complete.

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, front-loaded with the core action before constraints and the workflow tip. No filler, and the most important scoping rule (built-in entities excluded) is stated plainly.

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?

An output schema exists, so return values need not be explained. For a non-destructive mutation tool with full schema coverage and annotations, the description covers constraints, file-type rules, and call ordering, which is everything required to invoke it 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 coverage is 100%, so the baseline is 3. The description goes further by tying isDefault to a concrete workflow step (setting the usable thumbnail/generation reference right after entity creation), which adds selection meaning beyond the schema's plain 'primary reference (thumbnail)' phrasing.

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 specific verb (attach) and resource (uploaded file as a reference on an entity), with the file id prefix (vg_file_...) making the input type unambiguous. It is clearly separable from siblings like remove_entity_reference, upload_file, and 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: images work for all entity types, PDF/PowerPoint only for slideshow themes, built-in entities cannot take references, and new PRODUCT/ACTOR entities should call this immediately after create_entity with isDefault: true. This is exactly the routing and prerequisite guidance an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.