Skip to main content
Glama

HamroLink Business OS MCP Server

page.add_section

Appends or prepends a section to a page. Supports standard sections or custom code sections with raw HTML, CSS, and optional browser-side JavaScript (type: 'custom_code', html: '...', css: '...', js: '...'). When adding interactive widgets (calculators, quizzes, interactive previews) or announcements, supply responsive HTML & CSS (and optional sandboxed JS via 'js') or specify 'name' and 'position: start'. Automatically sanitizes HTML, scopes CSS, and isolates JS in a sandboxed iframe.

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": {
      "siteId": "<siteId>",
      "slug": "<slug>"
    },
    "name": "page.add_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsNoOptional browser-side JavaScript for interactive DOM manipulation, event listeners, calculators, quizzes, or animations (executed in an isolated sandboxed iframe with restrictive CSP).
cssNoOptional scoped CSS styles for the HTML section
htmlNoCustom HTML markup (required if type is 'custom_code' or when adding an HTML block)
nameNoDisplay name or label for the section (e.g. 'Announcement Banner', 'Custom Pricing Calculator')
slugYesTarget page slug (e.g. '/' or '/about')
typeNoSection type. Use 'custom_code' for custom HTML/CSS/JS sections, or standard types like 'features', 'cta', 'hero', etc. Defaults to 'custom_code'.
siteIdYesMongoDB Site ID
positionNoWhere to insert the section: 'end' (default) or 'start' (top of page)
sectionDataNoOptional full section object or custom content dictionary

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Goes meaningfully beyond the annotations by disclosing the security posture: HTML is auto-sanitized, CSS is scoped, and JS runs in an isolated sandboxed iframe with restrictive CSP. The annotations only cover readOnly=false, destructive=false, openWorld=true. It still doesn't say what is returned or how the section is identified after insertion.

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 purpose in the first sentence, then adds mode details, usage cue, and safety behavior in a logical order. Mild redundancy between the first mention of 'raw HTML, CSS, and optional browser-side JavaScript' and the later restatement about supplying responsive HTML & CSS, but nothing egregious.

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 9-parameter mutation tool with a nested sectionData object and no output schema, the description covers the custom-code path well but is silent on the return value (e.g., the created section's identifier) and on failure conditions. Adequate to invoke correctly, incomplete for interpreting the result.

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, but the description adds real value: it shows concrete values for type ('custom_code'), pairs html/css/js into a working usage pattern, and ties 'position: start' to the announcement use case. The nested sectionData object remains unexplained in both places, preventing a 5.

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?

States a specific verb and resource ('Appends or prepends a section to a page') and enumerates the two modes it handles: standard section types and custom code sections with HTML/CSS/JS. An agent can distinguish it from page.remove_section or page.create. It does not explicitly name a sibling it replaces, which keeps it just below 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?

Offers a conditional cue for one scenario ('When adding interactive widgets ... or announcements, supply responsive HTML & CSS ... or specify name and position: start'), which is genuinely useful. However, it gives no guidance on when to use this versus page.update or add_website_page, nor any prerequisites such as required permissions or whether the page must already exist.

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.