Skip to main content
Glama

new_component

Create a project-owned custom element with working component.js and schema.json, ready to use like a kit component by the component layer.

Instructions

Start a project component (components//): a custom element the project owns, used like a kit component by a "component" layer (props.tag). Writes a working component.js (default export: a class extending HTMLElement with renderAt(t, props, ctx), drawn once per frame, deterministically) and its schema.json (props as JSON Schema; x-m3e-animatable marks numbers that can be keyframed as "attr:", x-m3e-text words to translate). Edit both with put_component (in TypeScript or JSX if you like), then look at it with preview_component.

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": {
      "tag": "<tag>"
    },
    "name": "new_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagYesCustom element name: lowercase, with a hyphen, e.g. price-ticker
basisNoWhat you read and followed to make this change, as refs from search or lookup: rule:<lint or taste rule>, taste, feedback:<id> (earlier feedback this follows; what it answers goes in feedback), commit:<id> (an earlier change it builds on), asset:, template:, skill:… The person sees them under the change, so they know why it is this way. Name only what shaped it.
messageNoOne line saying why, kept with the change in the history
feedbackNoIds of the feedback this change answers (notes and marks from list_notes, list_examples or the conversation). When the person keeps the change it joins the record of that feedback, and when they then mark the feedback resolved it is the fix; when they take it back, the feedback opens again.
confidenceNoHow sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change.
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare the write/idempotency profile; the description goes further by specifying exactly what is written — component.js with a default-exported HTMLElement subclass exposing renderAt(t, props, ctx), drawn once per frame and deterministically, plus a schema.json with x-m3e-animatable and x-m3e-text marker semantics. That is meaningful behavioral context an agent cannot get from the structured fields. It does not say what happens if the tag already exists (error vs. overwrite), which is the main remaining unknown given idempotentHint=false and destructiveHint=false.

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 action and resource in the first clause, then layers the file-contract details and the sibling workflow. Dense but nearly every clause carries information the agent needs. The inline x-m3e-animatable/x-m3e-text explanation is slightly compressed but earns its space.

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 creation tool with no output schema and six parameters, the description is substantially complete: it explains what files appear, the runtime contract of generated code, and how to iterate afterward. Missing pieces are narrower — return value after creation and collision behavior when the tag already exists.

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?

With schema coverage at 83%, the schema already documents tag, basis, message, feedback and confidence in detail, so the baseline is 3. The description contributes only indirectly, clarifying that the tag maps to components/<tag>/ and props.tag. It adds nothing about basis, confidence or feedback that the schema does not already carry.

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 — 'Start a project component (components/<tag>/)' — and defines what that artifact is: a custom element the project owns, consumable by a 'component' layer via props.tag. It also distinguishes itself from put_component (editing) and preview_component (viewing), so an agent knows exactly which tool creates versus mutates versus inspects.

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 follow-on workflow: create here, edit both files with put_component, then inspect with preview_component. That routes the agent across siblings clearly. It stops short of stating when NOT to use this (e.g. when the component already exists, or when a composition is the better unit), so it is clear but not fully bounded.

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