Skip to main content
Glama

Add a library component

add_component
Destructive

Insert a component from the site's shared library into one or more existing pages, INSTEAD of hand-writing the markup yourself — the classes are already styled and themed to this site's colours. Choices: sc-page-title (the page's one ), sc-gallery (cross-fading photo reel — needs 'images'), sc-info-tiles (title + picture + text sections — needs 'tiles'), sc-instructions (numbered/titled steps, optionally with a button each — needs 'tiles'), sc-event (one dated thing: a class, a session, an opening — needs 'title'), sc-btn (a link styled as a button — needs 'label'). NOT offered: sc-header/sc-footer (the site's own shell already emits those) or sc-hero (placed once, on the home page, by the site's own build). 'anchor' says where it goes: {"type": "heading", "value": "", "position": "after"} (default), {"type": "id", "value": "", "position": "after"}, {"type": "main_end"} (append at the end of the page), or {"type": "replace", "value": "<class of an existing sc-* block>"}. 'pages' is "all" or a list of paths from list_site_files. A page whose anchor doesn't match comes back in 'findings' with what's wrong and the fix — other pages in the same call still get the component. Follow with publish_site.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
slugYes
pagesNo"all", or an array of page paths, e.g. ["index.html", "about.html"]
anchorYes
fieldsYesComponent-specific content. sc-page-title: {text, eyebrow?}. sc-gallery: {images: [{src, alt}]}. sc-info-tiles: {tiles: [{title, img?, alt?, text}]}. sc-instructions: {title?, intro?, tiles: [{title?, body, img?, alt?, button?: [label, href]}]}. sc-event: {title, img?, meta?: [{label, value}], desc?, rsvp_href?, rsvp_label?}. sc-btn: {label, href}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered structurally. The description does add real behavioral context beyond that: the replace anchor overwrites an existing sc-* block, per-page anchor mismatches are reported in 'findings', and other pages in the same call still receive the component. It never explicitly warns that insertion mutates/destroys existing page content, so it only partly reinforces the destructive hint.

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?

Effectively one long paragraph but front-loaded with the core purpose before enumerating components and anchors, and every clause carries operational detail. Slight redundancy with the schema's own 'fields' description, which repeats the per-component content shape.

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?

With no output schema, the description still covers the return-relevant behavior ('findings' with what is wrong and the fix), the mutation semantics, the anchor grammar, and the publish follow-up. For a nested-object, partially documented 5-param mutation tool, an agent has what it needs to call it correctly.

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 description coverage is only 40%, and the description compensates substantially: it spells out all four anchor shapes with example objects, defines 'pages' as "all" or paths from list_site_files, and maps each component name to its required fields. Only 'slug' is left unexplained, which keeps it short of a 5.

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 (insert) and resource (library component into existing pages) and immediately scopes it against the sibling write_site_files by saying it is used 'INSTEAD of hand-writing the markup yourself'. The enumerated component list makes the tool's surface unambiguous.

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

Usage Guidelines5/5

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

Gives explicit when-to-use (use a pre-styled library block rather than raw markup), explicit when-NOT (NOT offered: sc-header/sc-footer/sc-hero and why), and a routing instruction to follow with publish_site. It also documents the 'findings' partial-failure path, which tells the agent what a non-fatal miss looks like.

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