Skip to main content
Glama

Get video embed code

get_video_embed_code
Read-onlyIdempotent

Embed code and URL for a video. Rules (also in the answer as embedRules): Paste the code exactly as returned. Use responsive (it fills its container's width in the video's shape); iframe only for one fixed pixel size (set by width/height). The chat skin is asked for, not edited in: on a dark website call get_stream_embed_codes with theme dark (or auto) and paste that answer; never add ?theme= by hand. Never wrap the player in your own frame, border, rounded or fixed-height box, nor set width, height, border-radius or object-fit on the iframe: that cuts off the picture or the controls. For a smaller player put responsive into a narrower container (e.g. max-width: 480px), never a fixed height. Several videos on a page: show posters (thumbnailUrl from list_videos or get_video) with titles and load the player only for the clicked video: one player on the page, above the list or in a dialog. Every embedded player starts playing by itself, muted, once loaded, so never put several player iframes in a grid or list. Titles, descriptions and posters come from the API; never invent them.

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": {
      "video_id": "<video_id>"
    },
    "name": "get_video_embed_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
widthNoPlayer width in pixels, 100-4096
heightNoPlayer height in pixels, 100-4096
video_idYesVideo id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses non-obvious behavior of the returned artifact: every player autoplays muted on load, the answer carries embedRules, and theming cannot be applied by hand. It also warns that modifying iframe dimensions or styling breaks the picture or controls, which is behavioral context no annotation supplies.

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?

The purpose is front-loaded in the first sentence and the remainder is a set of short imperative rules, each actionable. It is long for a simple getter, and the styling prohibitions partially restate each other (width/height vs. fixed-height box), but no sentence is pure filler.

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?

With no output schema, the description still tells the agent what comes back (embed code, URL, embedRules) and where titles, descriptions and posters must come from. It covers the practical failure modes an agent would otherwise hit; only error behavior for an invalid video_id is unaddressed, which is minor for a read-only getter.

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% and width/height already carry range descriptions, so the baseline is 3; the description adds real meaning by explaining that width/height only take effect for the fixed-size `iframe` variant and are irrelevant to `responsive`. That conditional applicability is not expressible in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first clause, "Embed code and URL for a video," names the resource and what is returned, so an agent knows exactly what it gets. It implicitly separates itself from get_stream_embed_codes by routing theme requests there, but the differentiation is incidental rather than stated up front.

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 gives explicit when-to-use rules: `responsive` by default, `iframe` only for a fixed pixel size, and call get_stream_embed_codes with `theme` for dark sites instead of editing the query string by hand. It also covers the multi-video page case with a concrete pattern (posters from list_videos or get_video, one player in a dialog) and states an exclusion: never put several player iframes in a grid.

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.