Skip to main content
Glama

get-embed-code

Fetches the HTML embed code for an agent's chat widget using its agent ID, enabling you to add the agent to any website.

Instructions

Get the HTML embed code for the chat widget. Use this code to add the agent to any website.

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": {
      "agentId": "<agentId>"
    },
    "name": "get-embed-code"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentIdYesThe agent ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden, and 'Get' plus 'embed code' reasonably signals a non-mutating retrieval that returns an HTML snippet. However, it says nothing about whether the returned code depends on the agent key (regenerate-agent-key could invalidate it) or whether the agent must be active/public. Those are meaningful behavioral gaps for a tool whose output is published to a live site.

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?

Two short sentences, front-loaded with the purpose and with zero filler. The second sentence is slightly self-evident, but it does add the intended use of the returned artifact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter retrieval tool with no output schema, the description adequately states what comes back. It omits the dependency on agent key/state that would let an agent know when the returned code is valid, which is the main remaining gap.

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?

There is a single parameter (agentId) with 100% schema description coverage, so the schema already documents it. The description adds no meaning about the parameter, which is the expected baseline when schema coverage is complete.

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 description names a specific verb and resource: 'Get the HTML embed code for the chat widget.' That is clearly distinguishable from siblings like get-agent or regenerate-agent-key. It lacks any explicit contrast with a sibling, so it stops short of a 5.

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?

The second sentence gives downstream usage context ('Use this code to add the agent to any website'), which implies when you would fetch it. There is no guidance on prerequisites (e.g. whether the widget must be enabled or the agent published) and no exclusion compared with alternatives.

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