Skip to main content
Glama

define_section

Author a new kind of section for this shop, as a layout tree. Use this when the shop has nothing that does what the merchant asked for. The type is forced into the custom. namespace and cannot shadow a built-in or the theme's. If it is refused you get the exact reasons back; fix them and try again. Call get_design_guide first if you have not: it has the layout language and the rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesLower case, dashes. Becomes custom.<name>.
definitionYeslabel, category, description, icon, fields (the settings it takes) and render (the layout tree). See the DSL reference in your instructions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations cover safety (readOnlyHint=false, destructiveHint=false, openWorldHint=false), and the description adds real behavioral context: the type is forced into the custom. namespace, cannot shadow a built-in or theme section, and refusals return the exact reasons for retry. It stops short of describing persistence or the response shape but adds genuine value beyond the annotations.

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-loaded with the core action, then conditions, constraints, and the prerequisite. Every sentence is functional; it is slightly dense but no sentence is wasted.

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 a nested definition object and no output schema, the description covers purpose, when-to-use, constraints, failure behavior, and the prerequisite guide. The main remaining gap is any detail on what the successful response returns, though error behavior is addressed.

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?

Schema coverage is 100%, so both parameters are already documented (name format, definition structure). The description reinforces the naming constraint ('custom.<name>') but adds little syntax or format detail beyond the schema. Baseline 3 applies when the schema carries the parameter burden.

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: 'Author a new kind of section for this shop, as a layout tree.' This clearly distinguishes it from siblings like list_section_types, set_page_sections, and get_design_guide, which inspect or apply existing sections rather than define a new one.

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?

Explicitly states when to use it ('when the shop has nothing that does what the merchant asked for') and names a prerequisite ('Call get_design_guide first if you have not'). The alternative and the condition that selects it are both spelled out.

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