Skip to main content
Glama

odoo_website_add_snippet

Insert a website snippet into an Odoo HTML field at a chosen position with optional text, attribute, or image substitutions.

Instructions

Insert a snippet into a target HTML field. Fetches the snippet template from ir.ui.view by key, extracts its root HTML element, applies optional substitutions (text/attr/src changes before insertion), and places it at the specified position relative to an anchor. Positions: 'end' (after last element), 'begin' (before first), 'after' (after anchor_xpath), 'before' (before anchor_xpath), 'replace' (replace anchor_xpath). Substitutions format: {'relative_xpath': value} for text; {'relative_xpath/@attr': value} for attribute; {'relative_xpath/@style:background-image': 'url(...)'} for CSS property; {'relative_xpath/@src': 'https://...'} for image URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionNodefault
modelYes
res_idYes
field_nameYes
snippet_keyYesSnippet template key (e.g. 'website.s_text_block', 'website.s_cta_card')
positionNoend
anchor_xpathNoRequired for position in (after, before, replace). Xpath to the anchor element in target.
substitutionsNoMap of relative xpath → value for pre-insertion customisation.
langNoLang context for write (default: en_US)
dry_runNo
Behavior5/5

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

With no annotations, the description fully describes the behavior: fetching template, extracting root, applying substitutions with formats, and placement positions. It covers dry_run but not side effects, which is minor given the tool's nature.

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?

The description is efficiently structured with a purpose statement followed by detailed steps. Every sentence is informative and front-loaded with the main action.

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?

Given the complexity (10 params, nested objects, no output schema), the description covers the process well but lacks output details, dry_run behavior, and permissions. It is adequate but incomplete for a complex tool.

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 only 40%, and the description adds value by explaining substitution format and positions. However, it does not elaborate on core parameters like model, res_id, field_name, or dry_run, leaving gaps for the agent.

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?

The description clearly states the action 'Insert a snippet into a target HTML field' and explains the multi-step process, distinguishing it from sibling tools like update or remove.

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?

The context of adding snippets is clear, and the description details positions and substitutions. However, it does not explicitly state when to use alternatives, though sibling names imply differentiation.

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/rosenvladimirov/odoo-claude-mcp'

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