Skip to main content
Glama

validate_hook_usage

Validate WordPress hook usage: ensures core hooks use wpAction/wpFilter, custom hooks use action/filter, and flags raw add_action/add_filter for HookManager.

Instructions

Validate correct hook usage: wpAction/wpFilter for WordPress core hooks (never prefixed), action/filter for custom hooks (always prefixed). Detects raw add_action/add_filter that should use HookManager.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the plugin root
Behavior3/5

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

With no annotations, the description carries the burden of disclosure. It states the validation rules and detection of raw hooks, but does not specify if the tool is read-only, what errors or output format to expect, or any prerequisites beyond a path.

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?

Two sentences that are front-loaded with the tool's purpose. No unnecessary words; every sentence adds value.

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?

Given no output schema, the description adequately covers the tool's function and rules. However, it could be more complete by describing what the validation returns (e.g., list of violations) or how errors are reported.

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?

The single parameter 'path' is fully described in the schema as 'Absolute path to the plugin root'. The description adds no additional semantics beyond what the schema already provides, so baseline 3 is appropriate.

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 tool validates correct hook usage with specific rules for WordPress core hooks vs custom hooks. It distinguishes itself from siblings like inspect_hook_map by focusing on naming conventions and detecting raw add_action/add_filter calls that should use HookManager.

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 does not explicitly provide when-to-use or when-not-to-use guidance relative to siblings such as inspect_hook_map. While the purpose is clear, an agent might need more context to choose between this and other hook-related tools.

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/WPDiggerStudio/wpzylos-mcp'

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