Skip to main content
Glama

Generate Chat Component App.tsx

ethora-generate-chat-component-app-tsx
Read-only

Generate a ready-to-paste React App.tsx snippet that mounts the @ethora/chat-component. Returns the filename and snippet, with placeholders for missing values.

Instructions

Generate a ready-to-paste React App.tsx snippet that mounts @ethora/chat-component. Returns { filename: "App.tsx", snippet }; unpassed values are emitted as placeholders. Does not write any file. Get the appToken from ethora-app-credentials { appId, confirm: true } (other tools redact it). Auth: none required — pure code generator, no API calls. Errors: effectively none. Security note: the snippet includes appToken inline only as a quickstart convenience — do not ship hardcoded tokens to production.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiUrlNoEthora API base URL to embed in the snippet, e.g. `https://api.chat.ethora.com/v1`. Omit to emit a placeholder.
roomJidNoRoom JID to open on load. Omit to emit a commented-out placeholder.
appTokenNoappToken to embed in the snippet for quickstart testing. Omit to emit a placeholder. Do NOT hardcode real tokens in production source.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv26.9.3

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the readOnlyHint and destructiveHint annotations by disclosing no API calls, no file writes, effectively no errors, and a security note about not shipping hardcoded tokens. It also explains placeholder behavior for unpassed values. No contradictions 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.

Conciseness5/5

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

The description is compact yet information-dense, front-loading the primary action and return format, then covering side effects, auth, errors, and security in a logical order. Every sentence adds necessary information without redundancy.

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?

For a tool with 3 optional parameters and no output schema, the description covers purpose, return format, placeholder behavior, lack of side effects, auth requirements, error behavior, and security considerations. Nothing an agent needs to call it correctly 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?

Schema coverage is 100%, so the baseline is 3. The description adds value by explaining that unpassed values are emitted as placeholders and by warning against hardcoding real appToken in production, which is behavioral context beyond the schema.

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?

The description clearly states the tool generates a ready-to-paste React App.tsx snippet that mounts @ethora/chat-component, specifies the return format, and explicitly notes it does not write files. This is a specific verb+resource that distinguishes it from sibling tools like ethora-widget-embed-snippet, which generates embed snippets.

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?

The description provides clear context: it tells the agent to get appToken from ethora-app-credentials, states no auth is required, and clarifies it is a pure code generator with no API calls. It does not explicitly name alternative tools or exclusions, but the context is sufficient for an agent to decide when to use it.

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