Skip to main content
Glama

Widget Embed Snippet

ethora-widget-embed-snippet
Read-onlyIdempotent

Generate the tag to embed the Ethora chat widget, ensuring an activated agent exists for responses.

Instructions

Generate the tag that embeds the Ethora AI chat widget (the floating launcher + chat panel that website visitors use) for an app, plus the prerequisites that must hold before it answers. No API call; pure generator using this deployment's hosted widget URL and public API base. The widget answers with the app's ACTIVE bot: for API-created apps run ethora-agents-create-v2 -> ethora-agent-invite-to-chat -> ethora-agents-activate-v2 { agentId, chatJid } first, otherwise POST /v2/widget/sessions returns 422 and the widget stays silent. Requires: an activated agent on the app (ethora-agents-activate-v2); without it the widget opens but never answers. Auth: none required (uses the selected app when appId is omitted). Errors: effectively none; when no hosted widget is configured the snippet carries a <WIDGET_URL> placeholder. Related: ethora-agents-activate-v2, ethora-bot-widget-v2 (legacy per-app bot only).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appIdNoApp the widget belongs to (24-char hex). Defaults to the app from `ethora-app-select`.
botIdNoLegacy `data-bot-id` (bot XMPP address); only for old embeds. Prefer `appId`: the backend picks the active agent from the app.
localeNoUI locale (`data-locale`), e.g. `en`, `fr`, `es`.
apiBaseNoOverride the public API base (`data-api-base`). Defaults to this deployment's public API URL.
botNameNoDisplay name shown in the widget header (`data-bot-name`), e.g. the agent's name.
greetingNoGreeting shown when the panel opens (`data-greeting-message`).
positionNoLauncher corner (`data-position`).
botAvatarNoAvatar image URL shown for the bot (`data-bot-avatar`).
widgetUrlNoOverride the widget bundle base URL (the script is `<widgetUrl>/assistant.js`).
primaryColorNoBrand colour for launcher and bubbles (`data-primary-color`), e.g. `#0052CC`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv26.9.3

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, and the description adds independent value: 'Auth: none required', 'Errors: effectively none', the `<WIDGET_URL>` placeholder fallback, and the 422-on-sessions consequence of missing activation. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, but the description is dense and somewhat redundant: the activation prerequisite is stated twice (the runbook chain and the 'Requires:' sentence). The 422 detail is valuable but adds length; every sentence mostly earns its place.

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?

Given 10 fully documented optional parameters and no output schema, the description compensates by explaining the output shape (script tag, `<WIDGET_URL>` placeholder), auth, error behavior, and prerequisites. Slightly more detail on the generated snippet's structure would make it fully self-contained.

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 coverage is 100%, so the baseline is 3 and the schema does the heavy lifting. The description adds some cross-parameter context (appId drives active-agent selection, botId is legacy), but no per-parameter details beyond what the schema already documents.

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 ('Generate the <script> tag that embeds the Ethora AI chat widget') and explicitly differentiates from the sibling `ethora-bot-widget-v2` (legacy per-app bot only). The 'No API call; pure generator' clarification removes any ambiguity about side effects.

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 prerequisites ('Requires: an activated agent') for when the snippet is valid, names the exact activation runbook, and differentiates the legacy alternative `ethora-bot-widget-v2` by condition. An agent knows precisely when to use this tool and what must be true beforehand.

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

Deploy Server

Other Tools