Skip to main content
Glama

Create Component

create_component

Create and store a custom component for the tenant: a native scene that arranges its declared images and videos as tiles in 3D space. Returns the ComponentResponse (id + metadata) you can then reference from a composition. No project arg — components are tenant-scoped. SOURCE CONTRACT (version 4; the server instructions' Component Contract has the full rules and an example): send the complete source object {version:4, componentId, template, manifest, definition}. template is one sub-composition: a root holding , and one inline script ending in __cfScene.mount({ root: document.getElementById('root'), component, variables: __hyperframes.getVariables() }). data-composition-variables is the definition's projection (scalar inputSchema properties, then manifest slots). The manifest is {version:4, runtime:'hyperframes', hfContract:1, kind:'scene', assets, graphics:{api:'webgl2',…}, alphaPolicy}; slots are image or video. The source is admitted before it is stored: template lint, determinism (no timers, Date, network or CSS animation) and the declaration are checked, and a refusal names the rule. A version-3 source is retired and refused as component_source_retired. Place it with execution {version:4, componentId, sourceVersionId, params, seed, assets:{ slot: mediaId }} and placement {version:3, kind:'clip'}; slots never travel in params.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesPOST /components body. Org/user are server-resolved; never accepted from the body.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoThe entry's id: a `primitiveId` for a built-in, a `componentId` for an installed component.
kindNoRENDER kind (component | transition | scene). NOT the ClipSource variant — see `placement` for how to author it on the timeline.
moodNoVibe/tone tags (e.g. 'cinematic', 'minimal'). Filter to match the edit's mood.
nameNo
tagsNoFree-text search keywords.
tierNoQuality/applicability RANKING (a preference, not a flag). Prefer 'recommended'; reach for 'niche' only when its specific use-case is exactly the beat.
formatNo
intentNoSelection signal: a verb naming what this primitive accomplishes (e.g. 'product-trailer'). Match it to the beat you are authoring.
originNo
sourceNo'default' = built-in primitive (place by primitiveId); 'installed' = org-authored component (place by componentId).
tokensNo
useCaseNoThe edit ROLE(s) this primitive fills — the dimension to filter by for a beat (e.g. 'intro', 'title-over-footage', 'grade').
useWhenNoWhen to use this — AND when not to. The negative guidance is load-bearing; read it before picking.
versionNoThe ENTRY's version: a semver string ('0.0.0' until an authored component is versioned). Distinct from `manifest.version`, which is the runtime contract version (4 native, 2 retired TSX).
categoryNo
examplesNoUsage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back.
manifestNo
warningsNoNon-blocking save-time advisories — the create/update SUCCEEDED. Currently: a `fontFamily` string literal referencing a NON-vendored font (a bare CSS generic like 'serif', or an unknown named family like 'Arial') whose LIVE-lane pixels vary by render host — re-author with a vendored family or 'Georgia'. Omitted when there is nothing to flag; only present on the create/update responses.
avoidWithNoAuthoring guidance: ids of primitives that CONFLICT with this one — do not place together.
fixedCopyNoOn-screen strings this primitive BAKES — the read-side counterpart to propSchema. These literals render REGARDLESS of params (no param can change them); fork the source via get_component_source to edit them. Use this to see at author time what fixed copy (someone-else's marketing text, faux-code, faux-data) will appear before you render.
pairsWithNoAuthoring guidance: ids of primitives that COMPOSE well with this one in the same edit.
placementNo
textParamNoThe param field that carries this primitive's primary text; null = no single text slot.
propSchemaNo
descriptionNo
ejectedFromNo
propDefaultsNo
subtextParamNoThe param field for secondary text (subtitle/byline); null = none.
brandBindingsNoParams that can follow the project brand kit. Each {param, brandToken} says: set `param` to `brandToken` (a `$brand:` ref, e.g. '$brand:colors.accent') to track the brand instead of a literal. See the list response's `brandTokens` for the full ref vocabulary. Omitted when nothing is brand-bound.
durationInFramesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • addedInput schema / properties / body / properties / source / properties / manifest / properties / hfContract
      Added value: +{
      +  "const": 1,
      +  "type": "number"
      +}
    • addedInput schema / properties / body / properties / source / properties / manifest / properties / kind
      Added value: +{
      +  "const": "scene",
      +  "type": "string"
      +}
    • addedInput schema / properties / body / properties / source / properties / manifest / properties / runtime
      Added value: +{
      +  "const": "hyperframes",
      +  "type": "string"
      +}
    • changedInput schema / properties / body / properties / source / properties / manifest / properties / version / const
      Previous value: -2New value: +4
    • removedInput schema / properties / body / properties / source / properties / manifest / properties / visualMedia
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "version": {
      -      "const": 1,
      -      "type": "number"
      -    }
      -  },
      -  "required": [
      -    "version"
      -  ],
      -  "type": "object"
      -}
    • changedInput schema / properties / body / properties / source / properties / manifest / required
      Previous value: -[
      -  "version",
      -  "assets",
      -  "graphics",
      -  "alphaPolicy"
      -]New value: +[
      +  "version",
      +  "runtime",
      +  "hfContract",
      +  "kind",
      +  "assets",
      +  "graphics",
      +  "alphaPolicy"
      +]
    • addedInput schema / properties / body / properties / source / properties / template
      Added value: +{
      +  "maxLength": 2000000,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / properties / body / properties / source / properties / tsxSource
      Removed value: -{
      -  "maxLength": 8000000,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / properties / body / properties / source / properties / version / const
      Previous value: -3New value: +4
    • changedInput schema / properties / body / properties / source / required
      Previous value: -[
      -  "version",
      -  "componentId",
      -  "tsxSource",
      -  "manifest",
      -  "definition"
      -]New value: +[
      +  "version",
      +  "componentId",
      +  "template",
      +  "manifest",
      +  "definition"
      +]
    • removedOutput schema / properties / manifest / additionalProperties
      Removed value: -{}
    • removedOutput schema / properties / manifest / properties
      Removed value: -{}
    • removedOutput schema / properties / manifest / type
      Removed value: -"object"
    • changedOutput schema / properties / version / description
      Previous value: -"The ENTRY's version: a semver string ('0.0.0' until an authored component is versioned). Distinct from `manifest.version`, which is the runtime contract version and is always the literal 2."New value: +"The ENTRY's version: a semver string ('0.0.0' until an authored component is versioned). Distinct from `manifest.version`, which is the runtime contract version (4 native, 2 retired TSX)."
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say it is a non-idempotent, non-destructive write. The description goes well beyond that: the source is admitted before storage via template lint, determinism checks (no timers, Date, network, CSS animation) and declaration validation, refusals name the offending rule, a version-3 source is refused as component_source_retired, and the return is the ComponentResponse (id + metadata).

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?

Front-loaded with the purpose before the contract detail, and the SOURCE CONTRACT sentence is a useful signpost. It is dense and reads as a wall of clauses rather than discrete steps, but nearly every sentence carries contract information an agent would otherwise have to guess.

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 deeply nested write tool with an output schema, the description covers the essentials: input shape, validation/refusal behavior, versioning rules, and downstream placement. Return values needn't be spelled out given the output schema. Minor gaps remain around the non-source body fields, but nothing critical 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?

Overall schema coverage is high, so the baseline is 3, but the description earns extra by explaining the source object shape ({version:4, componentId, template, manifest, definition}), what the template sub-composition must contain, that manifest slots are image or video, and that data-composition-variables is the definition's projection. It stops short of covering the other optional body fields (origin, tokens, examples, propSchema, ejectedFrom).

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 and resource (create and store a custom component) and immediately narrows it to what the artifact is: a tenant-scoped native scene that tiles declared images/videos in 3D space. This is distinguishable at a glance from siblings like update_component, get_component_source and preview_component.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real usage context: components are tenant-scoped (no project arg), the result is referenced from a composition, and placement later goes through execution/placement objects with slots kept out of params. However, it never states when to prefer create_component over update_component or how it relates to resolve_builtin_component / repin_component, so routing between siblings is left to inference.

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.