Skip to main content
Glama

List roles

list_roles
Read-only

Fetch all WordPress roles and their capabilities for a site, enabling correct role selection when creating or updating users. Uses companion plugin or falls back to standard roles.

Instructions

List the roles registered on the site with their capabilities, so you can pick the right role before creating or updating a user. Uses the companion plugin when available and falls back to the standard WordPress roles otherwise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
Behavior4/5

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

Annotations already mark readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds meaningful behavioral context beyond annotations: it discloses the fallback behavior between the companion plugin and standard WordPress roles, which could affect output. This is valuable because the openWorldHint is true but the description clarifies a specific environmental dependency.

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 with no filler. The first sentence states the core action and purpose, and the second covers the fallback mechanics. Everything earns its place, and the most important purpose is front-loaded.

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?

For a read-only list tool with no required parameters, high schema coverage, and destructive/read-only annotations already provided, the description is complete. It explains the output scope (roles and capabilities), the fallback behavior, and the intended usage context. No other information an agent needs to call this correctly is missing.

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 sole parameter site_id is fully described in the schema (coverage 100%), including its optionality and behavior with multiple sites. The description adds no additional parameter-specific semantics (e.g., format or examples), so the baseline of 3 applies since the schema handles the explanatory burden.

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 specific verb-resource pair ('List the roles registered on the site') and includes their capabilities. It also gives the practical purpose ('so you can pick the right role before creating or updating a user'), which distinguishes it from sibling tools like list_users or get_user by linking it to user creation/update workflows.

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?

It explicitly indicates when to use the tool: before creating or updating a user, which is a clear context. However, it does not explicitly contrast with alternative tools (e.g., list_users) or state when not to use it, but the guidance is strong enough to route the agent appropriately.

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/alokemajumder/wpxmcp'

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