Skip to main content
Glama

bricks_update_scripts

Update per-page scripts for a WordPress page by injecting HTML, CSS, and JavaScript before the closing body tag. Use this tool to add custom scripts or styles to individual pages.

Instructions

Update per-page scripts for a WordPress page. Scripts are output in wp_footer. Include , , and tags as needed — all are output together before . IMPORTANT: WordPress strips backslashes — use String.fromCharCode(10) instead of "\n" in JavaScript strings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYesWordPress page/post ID
scriptsYesHTML/JS/CSS to inject before </body>. Include <script>, <style>, and <link> tags as needed.
Behavior3/5

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

No annotations exist, so the description must disclose behavioral traits. It reveals that scripts are output together before </body> and warns about backslash handling. Missing details: whether it overwrites or appends scripts, confirmation of success, or error 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, each carrying weight: purpose, output location, and a vital implementation note. No fluff, well front-loaded, and efficient.

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 two well-documented parameters and no output schema, the description covers purpose and output location. However, it lacks details on update behavior (replace vs append), confirmation, and error states. Adequate but with gaps.

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% for both parameters, but the description adds value by explaining the output location, the need to include specific tags, and the critical backslash workaround. These details go beyond the schema descriptions.

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?

The description clearly states the verb 'Update' and the resource 'per-page scripts for a WordPress page'. It specifies the output location (wp_footer) but does not explicitly differentiate from sibling tools like bricks_update_page, though the focus on scripts is distinctive.

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?

The description implies usage context (for injecting scripts into wp_footer) and provides a crucial warning about backslash stripping. However, it does not explicitly guide when to use this tool versus alternatives (e.g., bricks_patch_page, bricks_update_page) or when not to use it.

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/developer2013/bricks-mcp-open'

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