Skip to main content
Glama

Get an agent's website widget and embed code

get_widget
Read-onlyIdempotent

Get an agent's website widget and embed code

The agent's website chat widget as visitors see it, with the code to paste into a site. Every agent has one widget, the same one the dashboard shows; if the agent has none yet, this call sets it up with the defaults, switched on. embed_code.default adds Mojeeb's floating chat button (the simple install); embed_code.headless adds no button, and your page opens the chat with MojeebWidget.open() or MojeebWidget.attach(selector) (the custom install). Paste one of them once per page, before the closing body tag, exactly as returned. Changing the widget stays in the dashboard.

Input Schema

NameRequiredDescriptionDefault
agent_idYesThe agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior1/5

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

The annotations declare readOnlyHint=true, but the description discloses a write side effect: 'if the agent has none yet, this call sets it up with the defaults, switched on.' A get-or-create that registers and enables a widget modifies state, which directly contradicts the read-only annotation. An agent trusting the annotations alone would be surprised by the state change, so this is an Annotation Contradiction.

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 core purpose, then layered with genuinely useful detail (get-or-create behavior, the two embed variants, paste instructions, where changes live). It is on the longer side for a single-parameter tool, but every sentence earns its place and there is no filler.

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?

With no output schema, the description carries the return-shape burden and does so adequately by explaining `embed_code.default` vs `embed_code.headless` and how each is consumed. It covers creation behavior, install semantics, and mutation redirection; only fine-grained error/return detail is left to elsewhere.

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 description coverage is 100% — the single `agent_id` parameter already documents its format and the 404 `agent_not_found` / 403 `agent_not_authorized` failure modes. The description adds no parameter-level meaning of its own, so the baseline of 3 applies.

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 ('Get an agent's website widget and embed code') and goes further by naming the two returned variants (`embed_code.default`, `embed_code.headless`) and what each does. An agent can distinguish this from siblings like `get_agent` or `update_agent` without opening any schema.

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

Usage Guidelines4/5

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

Gives clear operating context: every agent has exactly one widget, the call is the same one the dashboard shows, and the embed snippets must be pasted once per page before the closing body tag. It also draws an exclusion line — 'Changing the widget stays in the dashboard' — so the agent knows not to attempt mutations here. It does not explicitly contrast against sibling read tools, so it falls short of a 5.

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.

Resources