Skip to main content
Glama

create_component

Create one or more reusable components on this document. Prefer creating components first and then composing them in template.hbs. Creating a component does NOT put it on a page — the entry has to place a page layout for anything to render. Every component is created unlocked; locks are the user's to set. The whole batch is validated together, so a parent and the child it calls can be created in one call regardless of array order, and either everything commits or nothing does. Changes are saved to the catalogue and can queue a thumbnail render that fetches external assets referenced by its content.

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": {
      "documentId": "<documentId>",
      "components": "<components>",
      "llm_model": "<llm_model>"
    },
    "name": "create_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
componentsYes
documentIdYesThe catalogue's id. Call list_documents first if you do not have one.
conversation_idNoPass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
expectedRevisionNoThe contentRevision you last read. Always send it: it is what proves this was written against the source that is actually stored.

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?

Adds substantial behavior beyond the annotations: components are created unlocked, the batch validates atomically and is order-independent for parent/child references, and saving can queue a thumbnail render that fetches external assets — which explains the openWorldHint. None of this is recoverable from the structured fields.

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-loads the core action and the page-layout caveat, with each subsequent sentence carrying distinct information. The thumbnail-render sentence is the least essential but still discloses external asset fetching, so it earns a 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?

For a complex mutation tool with no output schema, the description covers side effects, atomicity, and rendering consequences well. It stops short of saying what a successful response contains (e.g., whether a new revision is returned for expectedRevision), which an agent would want to know.

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 80% and the schema already documents nearly every field in depth, so the baseline is 3. The description still adds meaning for the `components` array (order-independence, whole-batch validation) and scopes the operation to 'this document', going slightly 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?

States a specific verb and resource ('Create one or more reusable components on this document') plus the batch scope. It immediately clarifies what the tool does NOT do ('does NOT put it on a page'), which separates it from anything that renders or composes output.

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 an explicit workflow preference ('create components first and then composing them in template.hbs') and a warning about the entry/page-layout requirement. It does not name sibling tools like update_component for later modification, so the when-not-to-use path is only implied.

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