Skip to main content
Glama

create_snippet

Create Go template snippets to render content items in LightCMS query pages. Define HTML templates with access to content fields like Title, Tags, and MetaDescription.

Instructions

Create a new snippet. Snippets are Go templates that render one content item in an lc:query index page. Reference by name:

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesGo template HTML. Available fields: .Title .FullPath .Tags .MetaDescription .Category .Data,required
nameYesSnippet name (used in lc:query directives),required
Behavior4/5

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

Annotations declare non-destructive and closed-world. Description adds crucial behavioral context: snippets are Go templates (implementation), render single content items (scope), and integrate specifically into lc:query directives (system integration point). Does not mention idempotency or duplicate name handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with zero waste: defines action, explains domain concept (Go template + lc:query), and provides usage example. Front-loaded with essential information. Appropriate length for 2-parameter tool.

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?

Complete for a simple creation tool with good annotations. Explains the templating domain, available integration points, and reference syntax. Lacks explicit error behavior documentation (e.g., name collision handling), but otherwise covers the 2-parameter surface adequately.

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% with complete descriptions for both 'name' and 'html' parameters. Description mentions 'Go templates' which reinforces the html parameter type, but does not add semantic detail beyond what the schema already provides. Baseline 3 appropriate for high schema coverage.

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?

Clear specific verb ('Create') + resource ('snippet'). Distinguishes from siblings (create_template, create_content) by defining snippets as 'Go templates that render one content item in an lc:query index page' and showing the HTML comment reference syntax.

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?

Provides explicit usage context via the lc:query HTML comment example showing how to reference the snippet by name after creation. Explains the specific domain (lc:query index pages). Lacks explicit contrast with create_template, but implied by the specialized definition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jonradoff/lightcms'

If you have feedback or need assistance with the MCP directory API, please join our Discord server