Skip to main content
Glama

wp_list_custom_code

Read-only

List the site-wide code snippets this site injects — name, location, priority, status and code size. Call this BEFORE wp_set_custom_code to find the exact existing name (re-using it updates in place instead of adding a second one), and AFTER a write that came back rendered=false. Also reports diagnostics about the Elementor install (version, Pro, registered post types).

Input Schema

NameRequiredDescriptionDefault
site_idYesWordPress site id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, so the safety profile is covered. The description adds genuine behavioral context beyond that: the duplicate-avoidance consequence of name re-use, the rendered=false failure-recovery workflow, and the side diagnostic payload about the Elementor install (version, Pro, post types) that an agent would not expect from the name.

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, front-loaded with what is returned, then when to call it, then the secondary diagnostic output. No filler; every clause carries operational information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description must describe returns, and it does so concretely plus discloses an unexpected Elementor diagnostics block. The before/after workflow guidance closes the remaining gap for an agent deciding whether to call it.

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?

Only one parameter (site_id) with 100% schema description coverage, so the schema already carries the meaning. The description adds nothing about the identifier format or scoping, which is the baseline 3 for a fully documented single-parameter tool.

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 ('List the site-wide code snippets this site injects') and enumerates the returned fields (name, location, priority, status, code size), which no sibling list tool provides. It is immediately distinguishable from wp_list_pages, wp_list_templates, and wp_list_media.

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?

Gives two explicit trigger conditions: call BEFORE wp_set_custom_code to discover the exact existing name (re-use updates in place rather than duplicating), and AFTER a write that returned rendered=false. Names the sibling tool and the reason for sequencing, leaving nothing to inference.

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